[Mono-list] C# resource Q

"C. Bergström" cbergstrom at netsyncro.com
Fri Jan 26 02:36:58 EST 2007


Paul wrote:
> Hi,
>
> I've compiled some code using the latest iteration of mono (1.2.2.1 -
> fedora rawhide) with the following for the compiler line
>
> gmcs button-new.cs button-form.cs -r:System.Windows.Forms
> -r:System.Drawing -r:System.Data -resource:a.png -resource:b.png
> -resource:c.png -resource:d.png
>
> It compiles fine, but if I come to run the executable, all I get is
>
> Unhandled Exception: System.Resources.MissingManifestResourceException:
> Could not find any resource appropriate for the specified culture or its
> parents. Makes sure "bmtestapp.Form1.resources" was correctly embedded
> or lined into assembly "button-new"
>
> This looks to me that I should be using a resources file rather than the
> command line -resource:
>   
iirc and I don't build many desktop apps.. You'll need to resgen2 your'e
.resx files first.. This should produce the .resource files you seek for

-resource:


Good luck

C.



More information about the Mono-list mailing list