dotnet / dotnet/msbuild

Non-flowing global properties

Open
#9,414 0 comments 5 reactions 0 assignees View on GitHub
Area: Language backlog Feature Request needs-design Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

When a project has a global property set (via command line or an MSBuild task) and then builds another project with the MSBuild task, the global property "flows" to the other project by default, unless overridden or unset via `RemoveProperty`. See https://github.com/dotnet/msbuild/issues/2915.

In many scenarios this is good and makes sense: if you `msbuild /p:Configuration=Debug` it makes sense to build "the debug version of everything" unless explicitly told otherwis inside the build.

But in many cases it's not desired behavior: you may want to control properties of the project you're building but not "flow" references, for instance if you set an `OutputPath` for an application project you might care that the application and its files are there but not the `bin/` folders of referenced libraries.

It might be nice to have a language/API feature to allow "non-flowing"/"non-infectious" global properties to be specified that affect only a single project.

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.