我该如何在MSBuild的.targets文件中确定项目是以调试模式(还是发布模式)构建的,并将此信息用作另一个属性的条件?
类似于:
<OutDir Condition="IsDebug">bin\Debug\$(SomeOtherProperty)\</OutDir>
<OutDir Condition="!IsDebug">bin\Release\$(SomeOtherProperty)\</OutDir>
是否存在Debug/Release模式,还是它们只是不同配置属性值的传统名称?
IsDebug
属性或具有 Debug 或 Release 值的ConfigurationType
(或类似)属性可能会很有用。 - Thomas Gerstendörfer