Tolga,

You do not have to change the directory of the build file.

Either you set the basedir attribute on the resources element to "Test", or 
you remove the prefix.

Gert

--------------------------------------------------
From: "Tolga Onbay" <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2008 4:41 PM
To: <nant-users@lists.sourceforge.net>
Subject: Re: [NAnt-users] MissingManifestResourceException

> Thanks, it really helped me. I checked the assembly with ildasm and the 
> Resource is included with wrong name. 
> Test.Test.Properties.Resources.resources. I change the directory of the 
> build file. Than it worked.
>
> In project, i added dynamicprefix and prefix parameters to the  resource 
> tag. Now it is working too. Is there any downside in adding this 
> properties, or is this the default solution?
>
> Thanks, again. I'm trying to find this for 2 days :)
>
>
>
>
> ----- Original Message ----
> From: Gert Driesen <[EMAIL PROTECTED]>
> To: Tolga Onbay <[EMAIL PROTECTED]>; nant-users@lists.sourceforge.net
> Sent: Tuesday, July 8, 2008 4:46:50 PM
> Subject: Re: [NAnt-users] MissingManifestResourceException
>
> Tolga,
>
> Try using ildasm to check what the manifest resource names were actually
> generated.
>
> If you're not familiar with ildasm, then you always email me your 
> assembly.
>
> Gert
>
> --------------------------------------------------
> From: "Tolga Onbay" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 08, 2008 3:20 PM
> To: <nant-users@lists.sourceforge.net>
> Subject: [NAnt-users] MissingManifestResourceException
>
>> Hi,
>>
>> I'm getting the MissingManifestResourceException with the software i'm
>> developing. I googled the exception and look for a solution but can't 
>> find
>> any. Also tried to search mail list, but the last problem with this
>> exception is in 2004. Exception is thrown when the code wants to access a
>> property which is added to project's resource file.
>>
>> Then i generate a .NET project for this exception. Project have just a
>> plain form with just one button.When button is pressed, a message box is
>> wanted to display a message which is written in resource file. Base
>> elements is written below
>>
>> P.S.: I tried to add different resource files for different cultures
>> (en-US, tr-TR, ...)
>>
>> Form1.cs:
>> ---------------------------------
>> ...
>> private void button1_Click(object sender, EventArgs e)
>>        {
>>            MessageBox.Show(Properties.Resources.ShowValue,
>> Properties.Resources.ShowHeader, MessageBoxButtons.OK,
>> MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
>> }
>> ...
>> ---------------------------------
>>
>> Resources.resx:(as Name->Value->Comment)
>> ---------------------------------
>> ShowValue->Test Value->No comment
>> ShowHeader->Test Header->No comment
>> ---------------------------------
>>
>> default.build:
>> ---------------------------------
>> ...
>>    <target name="buildTest">
>>        <mkdir dir="Test\bin" />
>>
>>        <csc target="winexe" output="Test\bin\Test.exe"
>> keyfile="Test\Test.snk" debug="true">
>>            <sources>
>>                <include name="Test/**/*.cs" />
>>            </sources>
>>            <resources dynamicprefix="true" prefix="Test">
>>                <include name="**/*.resx" />
>>            </resources>
>>        </csc>
>>    </target>
>> ...
>> ---------------------------------
>>
>>
>> Exception thrown:
>> ---------------------------------
>> See the end of this message for details on invoking
>> just-in-time (JIT) debugging instead of this dialog box.
>>
>> ************** Exception Text **************
>> System.Resources.MissingManifestResourceException: Could not find any
>> resources appropriate for the specified culture or the neutral culture.
>> Make sure "Test.Properties.Resources.resources" was correctly embedded or
>> linked into assembly "Test" at compile time, or that all the satellite
>> assemblies required are loadable and fully signed.
>>   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
>> culture, Boolean createIfNotExists, Boolean tryParents)
>>   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
>> culture, Boolean createIfNotExists, Boolean tryParents)
>>   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
>> culture, Boolean createIfNotExists, Boolean tryParents)
>>   at System.Resources.ResourceManager.GetString(String name, CultureInfo
>> culture)
>>   at Test.Properties.Resources.get_ShowValue() in
>> c:\...\Desktop\Test\Test\Properties\Resources.Designer.cs:line 68
>>   at Test.Form1.button1_Click(Object sender, EventArgs e) in
>> c:\...\Desktop\Test\Test\Form1.cs:line 22
>>   at System.Windows.Forms.Control.OnClick(EventArgs e)
>>   at System.Windows.Forms.Button.OnClick(EventArgs e)
>>   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
>>   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
>> button, Int32 clicks)
>>   at System.Windows.Forms.Control.WndProc(Message& m)
>>   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
>>   at System.Windows.Forms.Button.WndProc(Message& m)
>>   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&
>> m)
>>   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
>>   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
>> IntPtr wparam, IntPtr lparam)
>> ---------------------------------
>>
>>
>> Thanks...
>>
>>
>>
>>
>>
>> -------------------------------------------------------------------------
>> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>> Studies have shown that voting for your favorite open source project,
>> along with a healthy diet, reduces your potential for chronic lameness
>> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>> _______________________________________________
>> NAnt-users mailing list
>> NAnt-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nant-users
>>
>
>
>
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to