After pulling some NuGet packages into my .NET Aspire project, I ran into this cryptic startup failure:
Aspire.Hosting.DistributedApplicationException: Newer version of the
Aspire.Hosting.AppHost package is required to run the application.
Ensure you are referencing at least version '13.2.2'.
at Aspire.Hosting.Dcp.DcpDependencyCheck.EnsureDcpVersion(DcpInfo dcpInfo)
at Aspire.Hosting.Dcp.DcpDependencyCheck.GetDcpInfoAsync(...)
at Aspire.Hosting.Dcp.DcpHost.StartAsync(...)
The app host refuses to start, and the logs point you toward a version check deep inside DCP internals.
The error message tells me that a minimum version of the hosting package is required,but no matter how many times I randotnet restore or update NuGet packages through Visual Studio, the error persists. That's because there are two places that pin the Aspire version.
Why updating NuGet packages isn't enough
Aspire AppHost projects use a special SDK reference at the very top of the .csproj file — separate from the <PackageReference> items in the ItemGroup. This SDK reference controls how MSBuild loads the Aspire tooling before your packages are even considered. The DCP (Developer Control Plane) version check validates against the SDK version, not the NuGet version — so an outdated SDK reference will always fail, regardless of what your packages say.
Two things that must match: the Project Sdk="Aspire.AppHost.Sdk/x.x.x" attribute at the top of the csproj, and the PackageReference versions inside it. Both need to be bumped together.
The fix
Once you know this, the fix is easy:
- Update your NuGet packages as usual via the NuGet manager in Visual Studio or
dotnet add package. - Open your
*.AppHost.csprojfile and look at the very first line; theProjectelement'sSdkattribute. - Update the version number in
Sdk="Aspire.AppHost.Sdk/..."to match the Aspire version you're targeting.
Here is an example for my project:
The first line is what I missed to update. The version in the Sdk attribute must be updated manually. It is not touched by NuGet restore or package update tooling.
Going forward
Whenever you upgrade .NET Aspire, treat it as a two-part update: bump all the Aspire.* NuGet packages and update the Aspire.AppHost.Sdk version in your csproj. Keeping these in sync will save you from a confusing startup failure every single time a new Aspire release lands.