Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 439
Emma Avatar asked Nov 08 '16 03:11

Emma


People also ask

How do I fix NuGet recovery failed?

Quick solution for Visual Studio usersSelect the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.

How do I force a NuGet package to restore?

Enable package restore by choosing Tools > Options > NuGet Package Manager. Under Package Restore options, select Allow NuGet to download missing packages. In Solution Explorer, right click the solution and select Restore NuGet Packages.

Where is NuGet EXE located?

Install the official nuget.exe in your PC. Create a Symbolic Link here: %localappdata%\microsoft\winget\links. Make the nuget.exe globally available for your user to call it from anywhere, since the aforementioned directory should be present in your user's PATH variable.


1 Answers

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.

like image 174
Riga Avatar answered Sep 29 '22 08:09

Riga