Skip to content

Configuration management #350

@nguerrera

Description

@nguerrera

Today, VS still relies on parsing magic $(Configuration)|$(Platform) conditions. To bootstrap, we have these for Debug|AnyCPU and Release|AnyCPU in our props, but that means that the user cannot remove AnyCPU configurations and needs to manually add other configurations with these magic property groups which are quite out of place in our leaner project files.

We need a simpler way to define the valid set of configurations.

Proposal

  1. Replace the magic conditions in property group with two new properties
    $(Configurations)- lists the set of valid configurations, default will be Debug;Release
    $(Platforms) - lists the set of valid platforms, default will be AnyCPU

These are analagous to $(TargetFrameworks) vs. $(TargetFramework) except that any given build will build only one combination, there will be no auto-batching at the msbuild level over all configurations and platforms.

  1. Validate that $(Configuration) is one of $(Configurations), $(Platform) is one of $(Platforms) and $(TargetFramework) is one of $(TargetFrameworks).

This replaces the validation that we gave up where and invalid Configuration|Platform combination was observed by the lack of an OutputPath. We want the user to say what configurations they want without having to say the OutputPath for each, which we can define for them.

  1. Change VS project system to enumerate configurations and platform dimensions like it does for
    TargetFrameworks and stop parsing the magic conditions. Configuration management project-system#694

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions