Default Configuration property set up later than Directory.Build.props is used #11260
Closed
Description
Issue Description
Default Configuration
property is set up later than Directory.Build.props
is used
Steps to Reproduce
For example this setup in Directory.Build.props
won't work using just dotnet build
as Configuration
is still empty string. Using dotnet build -c Debug
everything works properly.
<Project>
<PropertyGroup>
<TargetFrameworks Condition=" '$(Configuration)' != 'Debug' ">net48;net9.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(Configuration)' == 'Debug' ">net48</TargetFrameworks>
</PropertyGroup>
</Project>
Expected Behavior
Configuration
is set to default value (e.g. Debug
) in Directory.build.props
when not specified explicitly
Actual Behavior
Configuration
is an empty string in Directory.build.props
when not specified explicitly
Analysis
No response
Versions & Configurations
No response
Metadata
Assignees
Labels
No labels