-
Notifications
You must be signed in to change notification settings - Fork 854
13.2 SDK breaks with Central Package Management #14550
Copy link
Copy link
Closed
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication‼️regression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!This used to work in an earlier version of Aspire and we broke it!
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I just tried to upgrade my app host from 13.1 to 13.2 with aspire update --channel staging (& @joperezr 's instructions on using the staging channel).
After the upgrade, my solution failed to compile with the following warning and error
WARN ASPIRE002 REDACTED is an Aspire AppHost project but necessary dependencies aren't present. Are you missing an Aspire.Hosting.AppHost PackageReference?
ERROR NU1009 The following PackageReference items are implicitly defined and cannot define a PackageVersion item: Aspire.Hosting.AppHost. Projects using Central Package Management require that implicit package versions be specified by the PackageReference item. For more information, visit https://aka.ms/sdkimplicitrefs
If I add the followign into my app host, the solution does compile successfully.
<PackageReference Remove="Aspire.Hosting.AppHost" />
<PackageReference Include="Aspire.Hosting.AppHost" />I'm suspisious that https://github.com/dotnet/aspire/blob/4ada2fc1bd901cf89d69fd395f4ea957bb29b799/src/Aspire.AppHost.Sdk/SDK/Sdk.in.targets#L66 is the cause - you can't add a PackageReference with Version when CPM is in use. However git blame suggests that target hasn't changed for a few months, so not sure why it's only breaking on this upgrade.
Expected Behavior
The SDK should still work after an upgrade.
Steps To Reproduce
- Follow @joperezr 's instructions at https://discord.com/channels/1361488941836140614/1420279564952666122/1473756392367325185 to set up staging channel.
- run
aspire updateon a my internal project.
Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication‼️regression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!This used to work in an earlier version of Aspire and we broke it!