Assets file project.assets.json not found. Run a NuGet package restore to generate this file.
After adding a .NET Standard project to my solution, Visual Studio was not able to add a proper dependency from the project:
Which results in these errors:
Restoring NuGet packages from Visual Studio did not solve the problem and the error remained:
Error Assets file '...\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
Solution that solved my issue
- Open a (PowerShell) Console
- Navigate to the solution folder
- Enter this command:
This triggered NuGet to actually update the packages:
I hope this helps you too.