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
To those with the same issue as me in Azure DevOps / VSTS environment encountering a similar message: C:\Program Files\dotnet\sdk\2.2.104\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(208,5): Error NETSDK1004: Assets file '...\obj\project.assets.json' not found. Run a NuGet package restore to generate this file
Add /t:Restore
to your MSBuild Arguments in Build Solution.
Nothing above worked for me. But simply deleting all 'bin' and 'obj' folders did the trick.
Seen this after adding a WinForms Core 3.1 project (from project templates) on VS-2019 vs 16.4.0 and trying to run it out of the box. Clean or Rebuild the entire solution did not work.
I just reloaded my solution.. that is File/Close Solution and then reopening it and rebuilding it solved the problem.
In case when 'dotnet restore' not works, following steps may help:
Try this (It worked for me):
run your VS as administrator after that in package manager console run dotnet restore.