This article applies to: âï¸ .NET Core 2.1.100 SDK and later versions
NuGet writes a file named project.assets.json in the obj folder, and the .NET SDK uses it to get information about packages to pass into the compiler. This error occurs when the assets file project.assets.json is not found during build. The full error message is similar to the following example:
NETSDK1004: Assets file 'C:\path\to\project.assets.json' not found. Run a NuGet package restore to generate this file.
Here are some possible causes of the error:
dotnet build
command from a directory path that contains a %
character. To resolve the error, remove the %
from the folder name, and rerun dotnet build
.dotnet restore
on the project.dotnet restore
on the project.dotnet restore
on the project.<packageSources>
section in the NuGet.Config file with a path that doesn't exist. To resolve the error, edit the NuGet.Config file to correct the package source path.Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. Additional resources In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4