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

Reply via email to