dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.6k stars 1.03k forks source link

.NET 7+ SDK requires nuget.org w/o a `PackageReference` #39544

Open richlander opened 4 months ago

richlander commented 4 months ago

Is that expected / documented?

See: https://gist.github.com/richlander/27c03db34b3f06fd044c611562def589

baronfel commented 4 months ago

This is happening because the dotnet6 package is installing runtimes, ref assembly packs, and apphost packs with the version 6.0.27, but the dotnet7 SDK is looking for these same dependencies with version 6.0.28. I'm not sure why the off-by-one is happening here, I would expect that for a given monthly update of the 6 and 7 SDKs, assuming both are in support, they would be using the same version of the 6 packs.

In addition, the 7 SDK is looking for an apphost pack named Microsoft.NETCore.App.Host.linux-x64, but the dotnet6 and dotnet7 Distro builds are creating apphosts packs with the name Microsoft.NETCore.App.Host.ubuntu.22.04-x64. This means that specific dependency can never be met by the Distro-built SDKs.

richlander commented 4 months ago

My guess is that Microsoft.NETCore.App.Host.ubuntu.22.04-x64 is now a legacy form and that .NET 8 distro SDKs use the portable form. For example, there will never be a Microsoft.NETCore.App.Host.ubuntu.24.04-x64 variant, because (I assume) we don't have that RID defined. I'm guessing this particular problem will work itself out.

Does that track @elinor-fung, @omajid?

Separately, it would be good to look into the off-by-one issue you raised.