Bug in CSC.Exe
-
I have a very unusual problem: I am using CSC.EXE to compile a small program with a background image on the main form. CSC seems to compile the program successfully, but when I go to run the program, it gives me a Thread exception error. When I debug the application, this is what I get: ================================================= 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 "Form1.resources" was correctly embedded or linked into assembly "Pax". baseName: Form1 locationInfo: Pax.Form1 resource file name: Form1.resources assembly: Pax, Version=1.0.1899.20704, Culture=neutral, PublicKeyToken=null ================================================= Now.. If I remove the background image from the form, the program compiles, and runs fine. Using: VS.Net 2003 Enterprise Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4 for Microsoft (R) .NET Framework version 1.1.4322
-
I have a very unusual problem: I am using CSC.EXE to compile a small program with a background image on the main form. CSC seems to compile the program successfully, but when I go to run the program, it gives me a Thread exception error. When I debug the application, this is what I get: ================================================= 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 "Form1.resources" was correctly embedded or linked into assembly "Pax". baseName: Form1 locationInfo: Pax.Form1 resource file name: Form1.resources assembly: Pax, Version=1.0.1899.20704, Culture=neutral, PublicKeyToken=null ================================================= Now.. If I remove the background image from the form, the program compiles, and runs fine. Using: VS.Net 2003 Enterprise Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4 for Microsoft (R) .NET Framework version 1.1.4322
Hi Ray, I tried to simulate the program and it works fine. Can you please the send the code? Cheers Ravindra Sadaphule MCSD.NET
-
Hi Ray, I tried to simulate the program and it works fine. Can you please the send the code? Cheers Ravindra Sadaphule MCSD.NET
Fixed: What I had forgotten (Actually what I had "learned", since I am a C# newbie) is that I need to include the .Resource file in the RSP file used to build the executable: /res:C:\Compiler\Source\Pax\Pax.Form1.resources Once I added this line to the RSP file, it ran flawlessly. Thanks for all of your consideration! Ray