2013-07-16 197 views
1

我試圖編譯一個項目,我得到一個奇怪的錯誤不能在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 

什麼可能會導致這樣,我該如何解決呢?

+1

您是否已經在VS之外運行應用程序? – GrandMasterFlush

+2

是不是你的錯誤很明顯? 「cl.read.1.tlog正在被另一個進程使用」 – DzungAh

+0

您是否嘗試查找並終止使用該文件的應用程序? – avignat

回答

1

這可能意味着您有兩個試圖立即運行的構建,或者Visual Studio已通過嘗試並行化構建來鎖定自己。關閉所有視覺工作室。殺死所有編譯器。再試一次。

2

我重現此問題時,在相同的解決方案不同的項目用相同的「中間目錄」配置。

建議:

  1. 禁用並行構建。在工具 - >選項 - >項目和解決方案 - >生成並運行並設置最大並行項目版本數爲1.

  2. 確保「中間目錄」(項目屬性 - >常規)解。即「$(Configuration)\ $(SolutionName)\ $(ProjectName)\」

相關問題