Is there an existing issue for this?
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 update on a my internal project.
Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response
Is there an existing issue for this?
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
If I add the followign into my app host, the solution does compile successfully.
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
PackageReferencewithVersionwhen 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
aspire updateon a my internal project.Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response