5

I recently started getting this error intermittently when running or building a solution in Visual Studio 2010:

The specified task executable cmd.exe could not be run. The process cannot access the file 'c:\temp\etc' because it is being used by another process.

There are similar problems reported elsewhere, due to things like two projects building to the same folder, or anti-virus issues, but none of them are the problem in this case. I've reduced the solution to a single project and it still happens.

1
  • Changing the TMP environment variable worked for me, see answers elsewhere Commented Mar 7, 2019 at 22:01

1 Answer 1

6

It turns out that the problem was a service my employer recently installed, called AppSense Application Manager Agent, which is designed to limit my access to admin-type features on the PC.

Luckily I still have access to the services control panel, and disabling the service fixed the problem.

Sign up to request clarification or add additional context in comments.

3 Comments

I had the same problem in Visual Studio 2010 after restaring my VDI. I couldn't build a project of ASP.NET MVC 3 application type. The error pointed to NuGet.targets file, but in details it was written that there is some locked file in 'C:\temp\...'. So I found your post and AppSense Application Manager Agent in services. I stopped it, disabled and it worked! You saved my time. Thank you!
I had to do the same- VS2015
.... I've been trying to find the answer to this issue for days. THANK YOU

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.