[Mono-devel-list] A little helping patch for monoresgen.cs
Eduard Ralph
mono at eduard-ralph.de
Wed May 5 07:10:15 EDT 2004
Hi,
trying to build the anoncvs of mcs, the monoresgen fails unless the
System.Windows.Forms Library is installed. Unfortunately if that is not the
case, it fails with "Cannot load support for ResX format: Object is null" (or
quite similar - not terribly helpful message.
IMHO the Assembly Loader should throw an Excpetion if it can't find the
Assembly but following the .NET Documentation it must return a Null. The
patch checks for this situation and throws a more intelligible message.
Eduard Ralph
------------ monoresgen.cs diff ---------------
39,40c39,47
< resxr = swf.GetType ("System.Resources.ResXResourceReader");
< resxw = swf.GetType ("System.Resources.ResXResourceWriter");
---
> if (swf != null)
> {
> resxr = swf.GetType ("System.Resources.ResXResourceReader");
> resxw = swf.GetType ("System.Resources.ResXResourceWriter");
> }
> else
> {
> throw new Exception ("Cannot load support for ResX format:
System.Windows.Forms Assembly not present");
> }
More information about the Mono-devel-list
mailing list