This article is a mirror article of machine translation, please click here to jump to the original article.

View: 4880|Reply: 1

[Communication] The asset file "project.assets.json" cannot be found. Run NuGet package restore...

[Copy link]
Posted on 12/12/2022 11:02:56 PM | | | |
I created a project with ASP.NET Core 6 in VS2022, but the error was generated as follows:

Severity Code Description Project File Line Suppression status
Error NETSDK1004 The asset file "F:\Project\itsvse\obj\project.assets.json" cannot be found. Run NuGet package restore to generate this file.        itsvse        C:\Program Files\dotnet\sdk\7.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets        267
solution

Option 1:

VS2022 -> tools -> command line -> developer command prompt, as shown in the following image:




Run the following command:



Option 2:

Go to the project directory and run the following command:



(End)




Previous:Difference between ASCII code, ISO8859-1, Unicode, GBK, and UTF-8
Next:Prohibiting Docker containers from accessing the Internet (extranet)
Posted on 12/16/2022 9:13:20 PM |
Learn it
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com