Assets file project.assets.json not found. Run a NuGet package restore

In my case the error was the GIT repository. It had spaces in the name, making my project unable to restore

If this is your issue, just rename the GIT repository when you clone

git clone http://Your%20Project%20With%20Spaces newprojectname

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.