Reputation: 652
I am trying to compile a project and I am getting a weird error
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
What might cause this and how can I solve it?
Upvotes: 2
Views: 8212
Reputation: 51
I reproduce this issue when different projects in the same solution were configured with the same "Intermediate Directory".
Suggestions:
disable parallel build. In Tools->Options->Projects and Solutions->Build and Run and set the maximum number of parallel project builds to 1.
be sure the "Intermediate Directory" (Project properties->General) is unique in the solution. i.e. "$(Configuration)\$(SolutionName)\$(ProjectName)\"
Upvotes: 5
Reputation: 2640
here are some suggestions:
you can download "unlocker" software and use it to determined what other process is using the file
according to that post outdated antivirus definition package may cause it. perhaps the antivirus scanned the file and that was the "other process"
Upvotes: 1
Reputation: 19232
This possibly means you have two builds trying to run at once, or visual studio has locked itself by trying to parallelize the builds. Close all visual studios. Kill all compilers. Try again.
Upvotes: 2