无法在 Visual Studio 2012 中编译项目

Eul*_*ler 2 c++ compiler-errors visual-studio-2012

我正在尝试编译一个项目,但遇到一个奇怪的错误

error MSB6003: The specified task executable "CL.exe" could not be run. The process cannot
access the file 'C:\Program Files\Microsoft DKs\Windows\v7.1\Samples\multimedia\directshow\
filters\myparser\UnitTest\Debug\cl.read.1.tlog' because it is being used by another 
process. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets
Run Code Online (Sandbox Code Playgroud)

什么可能导致这种情况,我该如何解决?

小智 5

当同一解决方案中的不同项目使用相同的“中间目录”配置时,我会重现此问题。

建议:

  1. 禁用并行构建。在工具->选项->项目和解决方案->构建和运行中并将并行项目构建的最大数量设置为1。

  2. 确保“中间目录”(项目属性-> 常规)在解决方案中是唯一的。即“$(Configuration)\$(SolutionName)\$(ProjectName)\”