Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
System.FormatException in AfterAssemblyLoadingAttached #1536
Comments
Hi @aaubry Thank you for the detailed bug report. Would you be interested in sending a PR with a fix? It should be a matter of fixing the |
I'll try. Thanks for indicating the location where the arguments are escaped. |
The above PR fixes the backslash issue. Please review and lemme know if it has to be modified. |
When I have a
MsBuildArgument
whose value ends in a backslash, there is an error somewhere along the intermediate code generation that causes the generated program to receive malformed arguments, resulting in a parsing exception. Here's an example of such:Attemptig to run this benchmark causes the following error:
I was able to pause the porgram before it compiled the
.notcs
file and add the following line before it parses the arguments:This outputs the following,
which confirms that the arguments are not being passed correctly. There's probably some escaping needed somewhere along the toolchain.
A workaround is to add a summy parameter that does not end with a backslash.