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 #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.