NuGet Package restore failed: Microsoft.Bcl.Build.Tasks.dll used by another process

Emma picture Emma · Nov 8, 2016 · Viewed 12.6k times · Source

NuGet Package restore failed for project MyProject.Application: The process cannot access the file 'C:\MySolution\packages\Microsoft.Bcl.Build.1.0.21\build/Microsoft.Bcl.Build.Tasks.dll' because it is being used by another process..

Any idea how to fix this issue? Thanks.

Answer

Riga picture Riga · Dec 8, 2016

In Windows Explorer went to the folder where the NuGet packages are installed for my solution

<VS Solution>\packages\

and deleted all the Microsoft.Bcl.* folders. After that could rebuild the solution without problems.