Skip to content

MSbuild on .NET Core can't parse properties with commas in the values #2999

Description

@danmoseley

Steps to reproduce

This is on Ubuntu.

dan@danmose2:~/dotnetU$ dotnet msbuild /p:a="b,c"
Microsoft (R) Build Engine version 15.5.179.9764 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1006: Property is not valid.
Switch: c

Expected behavior

It accepts /p:a="b,c" as defining a property named a with value b,c.

Actual behavior

It errors as above . On Windows it works fine.

On Unix if I remove the comma and use a space it is fine:


For switch syntax, type "MSBuild /help"
dan@danmose2:~/dotnetU$ dotnet msbuild /p:a="b c"
Microsoft (R) Build Engine version 15.5.179.9764 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  dotnetU -> /home/dan/dotnetU/bin/Debug/netcoreapp2.0/dotnetU.dll```

Environment data

msbuild /version output:

dan@danmose2:~/dotnetU$ dotnet msbuild /version
Microsoft (R) Build Engine version 15.5.179.9764 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

15.5.179.9764dan@danmose2:~/dotnetU$

OS info:

dan@danmose2:~/dotnetU$ uname -a
Linux danmose2 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
dan@danmose2:~/dotnetU$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
dan@danmose2:~/dotnetU$

If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):

dan@danmose2:~/dotnetU$ dotnet --version
2.1.3

cc @erozenfeld

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions