使用.NET Core 7(SDK 7.0.402),我运行命令:
dotnet build -c development
但我收到此错误:
错误 MSB4126:指定的解决方案配置“开发|任何 CPU”无效。请使用配置和平台属性指定有效的解决方案配置
几天前这个命令没有抛出任何错误...
项目文件包含
development
配置:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == 'Debug'">development</Configuration>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'development'">
<ConfigurationGroup>Debug</ConfigurationGroup>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'staging'">
<ConfigurationGroup>Release</ConfigurationGroup>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'production'">
<ConfigurationGroup>Release</ConfigurationGroup>
</PropertyGroup>
</Project>
我错过了什么? msbuild 中有什么变化吗?