Skip to content

Non-flowing global properties #9414

Open
@rainersigwald

Description

@rainersigwald

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: LanguageIssues impacting the MSBuild programming language.Feature RequestPriority:2Work that is important, but not critical for the releasebacklogneeds-designRequires discussion with the dev team before attempting a fix.triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions