Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump NuGet packages. Fix versions for .NET 6 and 7. #792

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

EnchantedCoder
Copy link
Contributor

I noticed that NuGet package restore would fail for .NET 6 and 7 due to some package references not having framework targets set, in addition to dependencies being out of date. This change fixes that.

Copy link
Member

@hakenr hakenr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EnchantedCoder Thanks for the contribution and for updating the packages. Could you please clarify what type of issues you were addressing? I haven't encountered any problems yet, but the central package management can still be quite bumpy, especially with tooling.

Comment on lines +21 to +29
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.18" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.29" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.18" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.29" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.4" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.18" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.29" Condition="'$(TargetFramework)' == 'net6.0'" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EnchantedCoder What type of NuGet package restore would failure did you encounter?
These packages (3) are only used in the documentation, which is net8.0-only and does not use multi-targeting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Havit.Blazor.Grpc.Client was failing to restore packages, complaining that the 8.0.x version is only compatible with .NET 8, as soon as I updated to 8.0.4. Making that change in the central package management file allowed it to restore and build normally again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I will try to replay that scenario on my side.
(Havit.Blazor.Grpc.Client does not reference any of the Microsoft.AspNetCore.Components.WebAssembly.* packages.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged into master, tried to remove the .NET6 + 7 PackageVersions for those three packages and still able to restore (incl. dotnet restore -f).

@EnchantedCoder I will push that commit to master. Can you please try to double-check on your side?

@hakenr hakenr merged commit e259a72 into havit:master Apr 18, 2024
1 check passed
@EnchantedCoder
Copy link
Contributor Author

Strange. Visual Studio 2022 must have just been confused, then.

@EnchantedCoder EnchantedCoder deleted the issue/update-nuget-packages branch April 18, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants