dotnet / dotnet/msbuild

Unable to pass in Property values containing a semicolon or comma in .Net Core MSBuild

Open
#471 21 comments 10 reactions 0 assignees View on GitHub
.NET Core
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

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:

``` xml






```

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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.