[Mono-bugs] [Bug 79679][Maj] New - Embedded Resources not found through -resource is specified

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Oct 16 18:49:49 EDT 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jay.e.sternberg at intel.com.


--- shadow/79679	2006-10-16 18:49:49.000000000 -0400
+++ shadow/79679.tmp.6191	2006-10-16 18:49:49.000000000 -0400
@@ -0,0 +1,79 @@
+Bug#: 79679
+Product: Mono: Compilers
+Version: 1.1
+OS Details: XP SP2
+Status: NEW   
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: jay.e.sternberg at intel.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Embedded Resources not found through -resource is specified
+Description of Problem:
+Taking the default application created by Visual Studio 2003 and adding 
+one button and one label, Mono builds fine and the resulting exe runs on 
+windows.  When I change the text of these controls to be retrieved from an 
+embedded resource file, mscorlib.dll chokes with the below error.  I have 
+also done this from a dll with the same result. Compilation includes the -
+resource argument for this resource as created by Prj2Make.
+Steps to reproduce the problem:
+1. Build default windows app in Visual Studio 2003
+2. Add elements to the form (example is a button and a label)
+3. Add an embedded resource to contain text for those elements
+4. Add code to used that embedded resource (example below)
+5. Compile (also below) and run
+Actual Results:
+An unhandled exception of 
+type 'System.Resources.MissingManifestResourceException' occurred in 
+Additional information: Could not find any resources appropriate for the 
+specified culture (or the neutral culture) in the given assembly.  Make 
+sure "WindowsApplication1.Resource1.resources" was correctly embedded or 
+linked into assembly "WindowsApplication1".
+baseName: WindowsApplication1.Resource1  locationInfo: <null>  resource 
+file name: WindowsApplication1.Resource1.resources  assembly: 
+WindowsApplication1, Version=1.0.2480.18386, Culture=neutral, 
+Expected Results:
+Form to be displayed as occurs with MSVC version
+How often does this happen? 
+Every time
+Additional Information:
+From Makefile:
+MCSFLAGS=-debug --stacktrace
+SYSTEM_DLLS= -r:System.dll -r:System.Data.dll -r:System.Drawing.dll -
+r:System.Windows.Forms.dll -r:System.Xml.dll
+\Form1.resx,WindowsApplication1.Form1.resources \
+        -resource:WindowsApplication1
+$(MCS) $(MCSFLAGS) $(SYSTEM_DLLS) -target:winexe -out:$(APP_EXE) 
+From Form1.cs:
+System.Resources.ResourceManager embedded_resource = new 
+this.label1.Text = embedded_resource.GetString("Label"); // "label1";
+this.button1.Text = embedded_resource.GetString("Button"); // "button1";

More information about the mono-bugs mailing list