Hi all,
Interesting issue. If I start the first line of my Form1.prg code with the comment statement “/*”
I get the following error at compile time:
“Error MSB3041: Unable to create a manifest resource name for "Form1.resx", Length cannot be less than zero.”
Parameter name: length OSSPremiumDeductions C:\Program Files (x86)\XSharp\MsBuild\XSharp.CurrentVersion.targets 110
If I leave line 1 blank however, the code compiles without error.
Example:
/* <--- line 1
some kind of comment
*/
USING System
USING ...
Cheers,
Roland
Error MSB3041: Unable to create a manifest resource name ...
Re: Error MSB3041: Unable to create a manifest resource name ...
Roland
can you send me that part of your code?
Robert
can you send me that part of your code?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Error MSB3041: Unable to create a manifest resource name ...
Hi Robert,
here's a little more of the non-working code. If the "/*" is on line #1, the code does not work. However, if line #1 is a blank line, the code compiles and runs no problem.
here's a little more of the non-working code. If the "/*" is on line #1, the code does not work. However, if line #1 is a blank line, the code compiles and runs no problem.
Code: Select all
/*
Change History:
Feb 09, 2010 V 2.0: Numerous changes for Pay Mod
*/
USING System
USING System.Collections.Generic
USING System.ComponentModel
USING System.Data
USING System.Drawing
USING System.Linq
USING System.Text
USING System.Threading.Tasks
USING System.IO...
...
Re: Error MSB3041: Unable to create a manifest resource name ...
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Error MSB3041: Unable to create a manifest resource name ...
Robert,
I just tried to duplicate this error with a new project and it does not occur - so what I sent you doesn't help you much.
I'll start stripping out code from the original problem code until the error no longer occurs - to determine what causes it or, I can send you the entre project if I am unable to figure it out.
Thanks
Roland
I just tried to duplicate this error with a new project and it does not occur - so what I sent you doesn't help you much.
I'll start stripping out code from the original problem code until the error no longer occurs - to determine what causes it or, I can send you the entre project if I am unable to figure it out.
Thanks
Roland
Re: Error MSB3041: Unable to create a manifest resource name ...
Roland,
Chris has uploaded an example to Github that does reproduce the error.
Robert
Chris has uploaded an example to Github that does reproduce the error.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Error MSB3041: Unable to create a manifest resource name ...
Roland, Chris,
Some background info about the error:
There is a task in the MsBuild project that compiles ResX files. This task analyzes the PRG file that accompanies the RESX file and tries to find the namespace for the form. In the Example on Github the fully qualified name of the form is "WindowsFormsApplication56.Form1". The resource is stored as "WindowsFormsApplication56.Form1.resources" in the Exe file.
The code inside our MsBuild support file uses Regular Expressions to find the Namespace and Class name.
There is also a part of the code that remove MultiLine comments. And this part fails when the opening "/*" characters start at the 1st position in the file.
This is because it tries to extract the sourcecode before the Multi Line comment.
See here:
https://github.com/X-Sharp/XSharpPublic ... me.cs#L236
It should not do that when index has the value 0.
So a blank line, or even a space before the "/*" will solve the problem.
I'll make sure that this gets fixed in the next build.
Robert
Some background info about the error:
There is a task in the MsBuild project that compiles ResX files. This task analyzes the PRG file that accompanies the RESX file and tries to find the namespace for the form. In the Example on Github the fully qualified name of the form is "WindowsFormsApplication56.Form1". The resource is stored as "WindowsFormsApplication56.Form1.resources" in the Exe file.
The code inside our MsBuild support file uses Regular Expressions to find the Namespace and Class name.
There is also a part of the code that remove MultiLine comments. And this part fails when the opening "/*" characters start at the 1st position in the file.
This is because it tries to extract the sourcecode before the Multi Line comment.
See here:
https://github.com/X-Sharp/XSharpPublic ... me.cs#L236
It should not do that when index has the value 0.
So a blank line, or even a space before the "/*" will solve the problem.
I'll make sure that this gets fixed in the next build.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: Error MSB3041: Unable to create a manifest resource name ...
Thanks for the info Robert.