[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.
http://bugzilla.ximian.com/show_bug.cgi?id=79679
--- 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:
+OS Details: XP SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: jay.e.sternberg at intel.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+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
+mscorlib.dll
+
+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,
+PublicKeyToken=null
+
+Expected Results:
+
+Form to be displayed as occurs with MSVC version
+
+How often does this happen?
+
+Every time
+
+Additional Information:
+From Makefile:
+
+MCS=mcs
+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
+APP_EXE=$(DIR)\WindowsApplication1.exe
+APP_RES=-resource:WindowsApplication1
+\Form1.resx,WindowsApplication1.Form1.resources \
+ -resource:WindowsApplication1
+\Resource1.resx,WindowsApplication1.Resource1.resources
+$(MCS) $(MCSFLAGS) $(SYSTEM_DLLS) -target:winexe -out:$(APP_EXE)
+$(APP_RES) $(APP_SRC)
+
+From Form1.cs:
+
+System.Resources.ResourceManager embedded_resource = new
+System.Resources.ResourceManager("WindowsApplication1.Resource1",
+System.Reflection.Assembly.GetExecutingAssembly());
+this.label1.Text = embedded_resource.GetString("Label"); // "label1";
+this.button1.Text = embedded_resource.GetString("Button"); // "button1";
More information about the mono-bugs
mailing list