RemoveAllProperties or other way to ensure single-instanced "utility" project builds #11390
Labels
Area: Language
Issues impacting the MSBuild programming language.
Priority:2
Work that is important, but not critical for the release
triaged
(inciting incident is microsoft/MSBuildSdks#601 (comment) but we've had this thought for a long time)
By default, global properties for the current project flow to projects built with the MSBuild task, unless overridden or explicitly removed with
RemoveProperties
in the MSBuild task call. This makes some sense for "regular" projects that build things (though see #9414), but there's another use of the MSBuild task: to ensure that some operation happens exactly once during a build no matter how big that build is--for instance "get some expensive value out of the git repo state" or "generate a version file for this build". But there's no way to specify "I promise that this project I am calling will only care about the explicit list of properties I pass it" so you're forced to add a bunch of stuff toRemoveProperties="TargetFramework;Configuration;Platform;..."
which is inevitably incomplete.The text was updated successfully, but these errors were encountered: