Fix NETSDK1004: project.assets.json Not Found
Quick answer. Restore the same inputs that the build uses. Fix the first restore failure before relying on a generated assets file. Applies to. .NET SDK and MSBuild Hosting and build diagnostics Match restore and build Generate assets Verify build Match restore and build → Generate assets → Verify build What does the error look like? CI builds with --no-restore, but the restore job never produced assets for that project and configuration. How do you diagnose the cause? Check solution and project paths, target framework/RID, intermediate output path and whether the build step receives the expected restored obj tree. In container builds, ensure project references and NuGet configuration are available before restore. Worked example Use the relevant portion below in a development or staging environment. Match the existing application’s packages, settings, and environment before applying the change. CLI Copy dotnet restore ./src/Web/Web.csproj dotnet build ./src/Web/Web.csproj --no-restor...