Unable to pass in Property values containing a semicolon or comma in .Net Core MSBuild #471
Open
Description
opened on Feb 8, 2016
In corefx repo, we pass in a special property in our outerloop jenkins runs that contains a colon ';' on the property name. With Full MSBuild, the behavior is that given the colon is found inside a quoted string, then it just assumes that the colon is part of the string. However, in .Net Core the behavior is different, since what it tries to do is to use the colon as the end of the string, and assumes that everything after the colon is a different switch. For example, if you have the following target:
<Target Name="TestTarget">
<ItemGroup>
<IParam Include="$(Param)" />
</ItemGroup>
<Message Text="The param passed was: @(IParam)" />
</Target>
You get the following when using full msbuild:
msbuild build.proj /p:Param="Hello;World" /t:TestTarget
Project "C:\Users\joperezr\Desktop\repo\corefx\build.proj" on node 1 (TestTarget target(s)).
TestTarget:
The param passed was: Hello;World
This is the result when running the same target in .Net Core MSBuild:
Corerun.exe MSBuild.exe build.proj /p:Param="Hello;World" /t:TestTarget
MSBUILD : error MSB1006: Property is not valid.
Switch: World
Activity