I have a brand new laptop, installed the latest abp cli, abp studio
Visual Studio 2026 SQLExpress Postgres latest engine node yarn etc etc
I started a new solution in ABP Studio,
Layered > MVC Razor > EF Core > SQL or Postgress > Multi Tenanted > No Mobile > No Public > No K8s > Not Modular
When i click create, I immediately get the following error:
An error has occured!
Failed to add migration Initial. Details: Unable to retrieve project metadata. Ensure it's an SDK-style project. C:\Program Files\dotnet\sdk\10.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1004: Assets file 'C:\Stash\AbpSolution3\src\AbpSolution3.EntityFr ameworkCore\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Stash\AbpSolution3\src\AbpSolution3.EntityFrameworkCore\AbpSolution3.EntityFrameworkCore.csproj]
any ideas what could be going wrong?
1 Answer(s)
-
0
- Solution
The error NETSDK1004: project.assets.json not found indicates NuGet packages were not restored before ABP Studio tried to run EF Core’s Add-Migration during Database synchronization. Also, the path shows .NET SDK 10.0.100 (preview/next gen) which is not yet supported by ABP Studio templates. Do the following once, then retry Database synchronization from ABP Studio.
A) Ensure supported .NET SDKs are installed and selected
- Install .NET 8.0 SDK (LTS) and .NET 9.0 SDK (if you target ABP versions that support it). Prefer .NET 8 for now.
- Make the default SDK a supported one (e.g., 8.0.x):
- If you have a global.json at the solution root, set it to a supported version: { "sdk": { "version": "8.0.403" } }
- Or install 8.0.x and run EF/restore with that SDK explicitly.
B) Restore and build the solution before database sync
- From the solution root (the folder that contains the .sln), run: dotnet restore dotnet build -c Debug
- If you use a corporate proxy/private feed, ensure NuGet sources are accessible (NuGet.Config) and no authentication prompts are blocking restore.
C) Verify EF Core tools work against the DbContext project
- From the EntityFrameworkCore project folder (…\src\YourApp.EntityFrameworkCore), run: dotnet ef migrations add Initial -s ..\YourApp.HttpApi.Host\YourApp.HttpApi.Host.csproj dotnet ef database update -s ..\YourApp.HttpApi.Host\YourApp.HttpApi.Host.csproj
- If this succeeds, ABP Studio’s Database synchronization will also succeed.
D) Run ABP Studio from the solution root
- Close ABP Studio.
- Open a terminal at the solution root and start ABP Studio: abp studio
- Open the solution in Studio, then use Database > Synchronize again.
E) If the task still fails in Studio
- Open Studio > Logs (Background Tasks) and copy any EF/restore errors.
- As a quick workaround, you can create and apply the initial migration manually (Step C), then continue using Studio thereafter.
Notes
- This problem is consistent with missing restore and/or running with an unsupported SDK (the 10.0.100 path in the error). ABP Studio 0.9.x targets stable .NET SDKs; use .NET 8 LTS to avoid tooling issues.
- Studio 0.9.6 added improvements around EF Core package installation and migration error visibility. If you’re on an older Studio, update to the latest release.
- Sources
- https://abp.io/docs/latest/studio/overview
- https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore
- https://docs.microsoft.com/en-us/ef/core/cli/dotnet
- https://abp.io/docs/latest/studio/release-notes
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
