[Mono-bugs] [Bug 78384][Nor] New - CSharpCodeProvider ignores
CompilerParameters.EmbeddedResources
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri May 12 16:40:24 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 karl at waclawek.net.
http://bugzilla.ximian.com/show_bug.cgi?id=78384
--- shadow/78384 2006-05-12 16:40:24.000000000 -0400
+++ shadow/78384.tmp.29716 2006-05-12 16:40:24.000000000 -0400
@@ -0,0 +1,74 @@
+Bug#: 78384
+Product: Mono: Compilers
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: Fedora Core 4
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: karl at waclawek.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CSharpCodeProvider ignores CompilerParameters.EmbeddedResources
+
+* Description of Problem:
+
+I am using the CSharCodeProvider class in Mono 1.1.15 (Beta 2) to
+compile an assembly with embedded resources. However, when running
+the application, I get a MissingManifestResourceException:
+
+The same application runs fine when built on MS .NET 2.0.
+
+
+* Steps to reproduce the problem:
+
+Add resources using the CompilerParameters.EmbeddedResources property,
+like this:
+
+ if (resources != null) {
+ StringCollection embeddedRes = parameters.EmbeddedResources;
+ foreach (string resource in resources)
+ embeddedRes.Add(Path.Combine(projectDir, resource));
+ }
+
+* Actual Results (error message):
+
+Unhandled Exception: System.Resources.MissingManifestResourceException:
+Could not find any resource appropiate for the specified culture or its
+parents. Make sure "SaxTreeviewDemo.MainForm.resources" was correctly
+embedded or linked into assembly "TreeviewDemo".
+in <0x002fa> System.Resources.ResourceManager:InternalGetResourceSet
+(System.Globalization.CultureInfo culture, Boolean Createifnotexists,
+Boolean tryParents)
+in <0x0040c> System.Resources.ResourceManager:InternalGetResourceSet
+(System.Globalization.CultureInfo culture, Boolean Createifnotexists,
+Boolean tryParents)
+in <0x0040c> System.Resources.ResourceManager:InternalGetResourceSet
+(System.Globalization.CultureInfo culture, Boolean Createifnotexists,
+Boolean tryParents)
+in <0x00058> System.Resources.ResourceManager:GetObject (System.String
+name, System.Globalization.CultureInfo culture)
+in <0x00010> System.Resources.ResourceManager:GetObject (System.String name)
+in <0x00852> SaxTreeviewDemo.MainForm:InitializeComponent ()
+in <0x00061> SaxTreeviewDemo.MainForm:.ctor ()
+in (wrapper remoting-invoke-with-check) SaxTreeviewDemo.MainForm:.ctor ()
+in <0x00050> SaxTreeviewDemo.MainForm:Main (System.String[] args)
+
+
+* Expected Results: no error
+
+
+* How often does this happen? always
+
+
+* Additional Information:
+
+Looking at the Mono sources, I believe the error is in file
+CSharpCodeCompiler.cs, function
+private static string BuildArgs(CompilerParameters options,string[] fileNames)
+which seems to ignore the EmbeddedResources property.
More information about the mono-bugs
mailing list