Skip to content

Configuration vs ConfigurationName build parameter #2115

@davkean

Description

@davkean

From @groogiam on April 5, 2018 21:30

There appears to be a discrepancy between specifying the configuration from msbuild from the command line between the old and new csproj formats.

The old csproj file allowed specifying the configuration using /p:configuration="Test"

e.g. msbuild MySln.sln /p:configuration="Test"

This would properly set the ConfigurationName parameter for pre build events.

Note: ConfigurationName is what visual macro dialog uses as well.
image

This however does not happen for the new csproj format. In order to fix this I have to specify another command line argument /p:configurationName="Test".

It seems like the setting configuration from msbuild should set this variable correctly no matter which csproj format is used.

Copied from original issue: dotnet/project-system#3452

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions