Reputation: 669
Microsoft.AspNetCore.Http v2.2.2 is now considered deprecated by/from NuGet in VS-2022.
Q1) Should I uninstall it?
Q2) My Blazor-PWA project is using .NET 7.0. I see there are TWO .NETCore: Is this proper?
Microsoft.NETCore.App 6.0.24 Microsoft.NETCore.App 7.0.13
Q3) I see there are other double-versions (5, 6, 7) below: Is this proper?
Here is the output from dotnet --info:
.NET SDK: Version: 7.0.403 Commit: 142776d834
Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.403\
Host: Version: 7.0.13 Architecture: x64 Commit: 3f73a2f186
.NET SDKs installed:
7.0.403.NET runtimes installed: Microsoft.AspNetCore.App 5.0.17 Microsoft.AspNetCore.App 6.0.24 Microsoft.AspNetCore.App 7.0.13
Microsoft.NETCore.App 6.0.24 Microsoft.NETCore.App 7.0.13
Microsoft.WindowsDesktop.App 6.0.24 Microsoft.WindowsDesktop.App 7.0.13
Upvotes: 3
Views: 3458
Reputation: 3688
Q1:
Regarding Microsoft.AspNetCore.Http, you can uninstall it, but only if you are using .NET Core 3.0 or above. Because with the release of .NET Core 3.0, many ASP.NET Core assemblies are no longer published as packages to NuGet. Instead, these assemblies are included in the Microsoft.AspNetCore.App shared framework that is installed through the .NET Core SDK and runtime installer. To see a list of packages that are no longer released, see Removing obsolete package references.
Q2:
This is because both .NET 6.0 and .NET 7.0 are installed on your computer. This will not affect the running of your project, because you can specify which version of .NET your project is based on. You can check which version of .NET your project is using by looking at the TargetFramework property in the project's .csproj file, or you can modify the .NET version pointed to by your project through TargetFramework (provided that you already have this version of .NET Install).
Q3:
dotnet --info
can show that you have multiple versions of the .NET runtime and SDK installed on your computer. This is normal and expected behavior as different projects may require different versions of the .NET runtime and SDK. As long as your project is running normally, you don't need to consider these for the time being. If your project causes running errors due to these, Visual Studio will also prompt you to install the corresponding .NET runtime and SDK. If you want to figure out the difference between .NET runtime and SDK in .NET, please refer to: What's the difference between SDK and Runtime in .NET Core?
Upvotes: 4