Skip to content

dotnet build with multiple constants #9562

@tobhofmann

Description

@tobhofmann

Hello,

I have a newly created f# netcoreapp2.1 console app with a vanilla fsproj file. I want to pass multiple constants to dotnet build. This works and the constants are validated when I run the program:

msbuild /p:DefineConstants="HELLO;WORLD"

... but this fails with MSB1006 errors:

dotnet build /p:DefineConstants="HELLO;WORLD"
dotnet build /p:DefineConstants=HELLO;WORLD
dotnet build /p:DefineConstants=\"Hello,World\"
dotnet build /p:DefineConstants=\"Hello;World\"
dotnet build /p:DefineConstants='Hello;World'
(...)

Is there a way to make this work with dotnet build cli? Thanks for the help.

Actual behavior

MSB1006 "property not valid..." is thrown

Environment data

  • dotnet sdk 2.1.300
  • win7-x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions