Showing posts with label NuGet Package restore failed. Show all posts
Showing posts with label NuGet Package restore failed. Show all posts

Thursday, September 6, 2018

NuGet Package restore failed

If you ever encounter this error  delete all the related packages will resolve this.

I will further explain this using an example.

Suppose you get this error for Microsoft.Bcl.Build.Tasks.dll as shown below.

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..

This can be resolved by deleting all the Microsoft.Bcl.* folders in the packages under the solution.

Regards,
Samitha