0

尝试设置两个并行环境,使用单独的 .sln,但使用相同的 vcxproj,因为我正在处理 100 多个项目。我想要不同的 OutDir 和 IntermediateDir,所以我把它放在每个配置的变体 props 文件中:

<PropertyGroup>
  <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)5\</OutDir>
  <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)5\</IntDir>
  <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)5\</OutDir>
  <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)5\</IntDir>
</PropertyGroup>

在其他 .props 中没有 5 的情况下相同。似乎可以正常构建,但对于启动应用程序,它会尝试在 SolutionDir/Release5/foo.exe 而不是 foodir/Release/foo.exe 中查找内容。我认为这是因为相对路径解析不正确。我错过了什么?

4

1 回答 1

0

事实证明,这<OutputFile>也需要调整。我只是根据 $(OutDir) 定义它并解决了问题

于 2013-04-24T21:17:16.840 回答