代码实现啊
<ItemGroup Condition="'$(Configuration)'=='Release'">
<ProjectReference Include="A" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<ProjectReference Include="B" />
</ItemGroup>
csproj 中的条件引用
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<ProjectReference Include="..\Cnblogs.Application.Interfaces\Cnblogs.Application.Interfaces.csproj" />
</ItemGroup>
C# 代码中的条件编译
#if DEBUG
//...
#endif