Nuget Package Restore is a process that happens when a Visual Studio solution is loaded and some Nuget Packages are missing. This usually happens when a solution doesn't have its package contents checked into Source Control (which is a best practice).
Questions tagged [nuget-package-restore]
872 questions
523
votes
41 answers
Assets file project.assets.json not found. Run a NuGet package restore
I'm trying to use nopCommerce(Which is written in .NET Core) but when I want to run the project I face 52 Errors telling me Run a nuget package restore
Assets file ~\obj\project.assets.json' not found. Run a NuGet package restore to generate this…

NeverTrust
- 5,487
- 2
- 13
- 16
305
votes
25 answers
How do I enable NuGet Package Restore in Visual Studio?
There's a similar post on stack but it doesn't help with my issue possibly because I am using Visual Studio 2015.
How do I get the "Enable NuGet Package Restore" option to appear in VS2015?
I chose File > New Project and created an empty ASP.NET Web…

Dan Beaulieu
- 19,406
- 19
- 101
- 135
166
votes
6 answers
[A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast to... web.config issue
I am getting the following error:
[A]System.Web.WebPages.Razor.Configuration.HostSection cannot be cast
to [B]System.Web.WebPages.Razor.Configuration.HostSection. Type A
originates from 'System.Web.WebPages.Razor, Version=2.0.0.0,
…

Maxim
- 3,836
- 6
- 42
- 64
123
votes
12 answers
NuGet auto package restore does not work with MSBuild
I'm trying to build a solution with packages content missing (except repositories.config inside) with MSBuild 12.0. I expect it to auto restore all missing packages before building but this is not the case - MsBuild reports tons of errors:
"are…

UserControl
- 14,766
- 20
- 100
- 187
90
votes
16 answers
NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0
I have such error in vs 2012:
NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0
I see that it's a bug https://nuget.codeplex.com/workitem/3780 that was fixed for version…

Midnight Guest
- 1,863
- 3
- 16
- 26
89
votes
4 answers
Why isn't there any packages folder in my .NET Core solution's containing folder?
Are packages now cached in a more shared location somewhere or what?
My solution folder is devoid of any packages folder:

ProfK
- 49,207
- 121
- 399
- 775
79
votes
25 answers
Error NU1105 Unable to find project information - The project file may be invalid or missing targets required for restore
All of a sudden, I am getting the following errors for 3 projects in a solution:
Error NU1105 Unable to find project information for 'C:\code\example\src\libs\example.I18n\example.I18n.csproj'.
The project file may be invalid or missing targets…

Paolo B
- 3,026
- 5
- 21
- 43
61
votes
3 answers
Nuget - Package restore failed. Rolling back package changes for 'WebApplication1'. 0
It's my own custom nuget package that I've not published yet and testing locally.
The nuget package consists of a dll file and nuspec file is as follows.
MyLib
1.0.0
…

user2727195
- 7,122
- 17
- 70
- 118
58
votes
9 answers
Build error, This project references NuGet
When I try to build my solution, I get the following error message:
Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on
this computer. Use NuGet Package…

Bryan
- 3,421
- 8
- 37
- 77
51
votes
9 answers
Local source of nuget packages doesn't exist
After opened the project in another computer and run it on VS Code, the following problem occurred:
C:\Program Files\dotnet\sdk\2.2.300\NuGet.targets(121,5): error : The
local source C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'
doesn't…

KSA
- 675
- 1
- 5
- 9
51
votes
7 answers
How to enable nugets package restore in Visual Studio 2015?
How do I enable the nuget package restore feature in Visual Studio 2015?
The feature is just missing in my context menu (Yes - I've double checked that I try it on the solution instead of a project)
My only project is a .NET 4.5 console application…

boop
- 7,413
- 13
- 50
- 94
48
votes
3 answers
How to fix `Your project does not reference ".NETFramework,Version=v4.6.1" framework...`
I got this error
Your project does not reference ".NETFramework,Version=v4.6.1" framework. Add a reference to ".NETFramework,Version=v4.6.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore. after checkout a…

Luke
- 1,623
- 3
- 24
- 32
41
votes
11 answers
Unauthorized nuget package from Visual Studio Team Services using asp.net core rc2
I am unable to install/restore nuget packages from a Visual Studio Team Services feed in an asp.net core web application (RC2). I receive the following:
error: Response status code does not indicate success: 401
(Unauthorized).
I am running…

HPaxton
- 443
- 1
- 4
- 8
41
votes
15 answers
An error occurred while trying to restore packages. Please try again
I am trying to restore the missing nuget packages and it keeps giving me this Error:
An error occurred while trying to restore packages. Please try again.
Any experience solving this?
How can I find out what exactly is causing the error?

user3311522
- 1,638
- 3
- 19
- 33
38
votes
8 answers
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…

Emma
- 955
- 2
- 8
- 23