如何使项目构建在 1)(本地)在 Visual Studio 内编译和 2)由 TF Build Agent 上的 TFS Build Server 触发时表现不同?
我试过(都没有成功)
<PropertyGroup Condition="'$(TF_BUILD)' == 'true' AND '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true' AND '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
我(在这两种情况下)创建了 2 个这样的属性组,其中 == 和 != 在第一个条件(应该导致不同行为的条件)和 PropertyGroup 中的不同内容(这是我真正的目标)中交换。
我正在使用 VS 2017 和 TFS 2017。
编辑/更新:
我以自己的方式发现了错误,是我编辑了 AnyCPU PropertyGoup 并构建了 x86。