Skip to content

BuildCheck: Warn when reading Configuration early #12792

@Youssef1313

Description

@Youssef1313

Summary

Reading Configuration early can be problematic, and can introduce behavior differences between building single project vs building whole solution.

Building a whole solution will set Configuration as a global property, making it available anytime in evaluation (e.g, in Directory.Build.props). But building a single project without explicitly specifying configuration will only have the value available a little bit later and won't be available in Directory.Build.props.

Logic that will try to change output path based on Configuration in Directory.Build.props will suffer from behavior differences between building single project vs building whole solution, which is very bad.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: BuildCheckBuildCheck SuggestionSuggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions