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 file. Nop.Web.MVC.Testsote
when I use the right click on the solution and selecting Restore Nuget Packages I get this message:
All packages are already installed and there is nothing to restore.
but those 52 Errors are still there and in Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution there is nothing installed on the solution,also I Recently updated my VS2017 to 15.5.4
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.
json file is generated in the process of restoring the NuGet packages in projects that use project. json . It holds a snapshot of all the information that is generated as NuGet walks the graph of packages and includes the version, contents, and dependencies of all the packages in your project.
To resolve the error, remove the % from the folder name, and rerun dotnet build . A change to the project file wasn't automatically detected and restored by the project system. To resolve the error, open a command prompt and run dotnet restore on the project.
In Visual Studio, the Package Manager Console provides many flexible options for updating and reinstalling packages. On the Installed tab, select a package, record its name, then select Uninstall. Switch to the Browse tab, search for the package name, select it, then select Install).
To fix this error from Tools > NuGet Package Manager > Package Manager Console simply run:
dotnet restore
The error occurs because the dotnet cli does not create the all of the required files initially. Doing dotnet restore adds the required files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With