我尝试设置两个并行环境,使用不同的.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中查找内容。我认为这是因为相对路径没有被正确解析。我遗漏了什么?
发布于 2013-04-25 05:17:17
事实证明,<OutputFile>也需要调整。我只是用$(OutDir)来定义它,它解决了这个问题
https://stackoverflow.com/questions/16005794
复制相似问题