[Mono-dev] Resource Issue

Robert Jordan robertj at gmx.net
Fri Feb 29 21:54:39 EST 2008


Robert Jordan wrote:
> Jonathan Pobst wrote:
>> I hate to just dump my project here, but I am having trouble making a 
>> standalone test case out of this.  It causes an exception when I compile 
>> in MonoDevelop and try to run on opensuse 10.3.
>>
>> For my pet project XmppApplication:
>> svn checkout http://xmppapplication.googlecode.com/svn/trunk/ 
>> xmppapplication
>>
>> Compile on .net, runs on .net correctly.
>> Compile on .net, runs on opensuse 10.3 mono 1.9 correctly.
>> Compile in MD, fails on opensuse 10.3 mono 1.9 runtime with exception below.
>> Compile in MD, runs on .net correctly.
>> Compile in MD, runs on winmono 1.9 correctly.
>>
>>    at XmppApplication.Base.Properties.Resources.get_DefaultAvatar () 
>> [0x00000] in 
>> /home/jpobst/Desktop/XmppApplication/XmppApplication.Base/Properties/Resources.Designer.cs:79 
> 
> VS.NET is embedding the image this way:
> 
>    <data name="DefaultAvatar" type="System.Resources.ResXFileRef, 
> System.Windows.Forms">
>      <value>..\Resources\default.png;System.Drawing.Bitmap, 
> System.Drawing, Version=2.0.0.0, Culture=neutral, 
> PublicKeyToken=b03f5f7f11d50a3a</value>
>    </data>
> 
> But I did not find any code in mono's ResX support that flips the
> backslashes. This explains why the code runs on Windows: this OS
> does not care about the \ + / mess.

Hmm, my assumption is not quite correct, since MD is converting the
ResX at compile time. Maybe the generated .resource does not contain
these images at all.

Robert



More information about the Mono-devel-list mailing list