Replies: 3 comments 1 reply
-
The API isn't deprecated, but the 2.2.0 NuGet package is because ASP.NET Core 2.2 is out of support and since .NET Core 3.0 the API is part of the ASP.NET Core Shared Framework. You just need to use a framework reference instead of a package reference. |
Beta Was this translation helpful? Give feedback.
-
@martincostello thank you for the reply! I will give it a go. I will mark this as answer since it looks like the information I was trying to find. Cheers! |
Beta Was this translation helpful? Give feedback.
-
@martincostello thanks for the attempt but did not resolve my issue. This is a .NET 7/8 Blazor application. When I remove the These are the errors when the package is removed:
Adding the following:
If I install the package the errors no longer exist so I don't think this approach works in latest versions of .NET or I am doing something wrong. I was just trying to remove this "Obsolete" package from the list of packages installed. When I remove this package the project loses access to the following namespaces and functionality:
"There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'" So now I can see there are a couple other packages that are also obsolete that this project is using. So I added those package references and removed the Microsoft.AspNetCore.App package reference and
Got the following list of errors: So directly referencing these packages inside a client project at least does not give this Blazor application access to these packages. Is there something I am missing? If I add a project reference, it installs the package, which when you look at nuget packages manager then shows these obsolete packages as being installed. I guess the solution I am after is more one that does not include any obsolete packages in the project or solution. I am looking for what solutions replace these packages if that makes sense in a Blazor Wasm project. Adding a package reference is the same thing as installing the package dependency Looks like there are 3 obsolete packages that are being used in the project. The goal is to have a solution to remove these if possible, or is it best just to leave them? Since not supported I am not sure if checked for vulnerabilities anymore. Thanks for trying. Any other suggestions? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A Blazor Client WASM Project (Not Server) it has a dependency on a few "obsolete" packages I would like to either remove for what should be used in place of them or at least remove the "obsolete" package warnings. I am not sure these packages are considered "mature" and "secure" as I am being lead to believe and want to be sure this is in fact the case.
These three packages in particular.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.localization.cookierequestcultureprovider?view=aspnetcore-8.0
What is recommended for alternative to using
CookieRequestCultureProvider
andIHttpContextAccessor
and 'http" in ablazor-wasm
project in order to remove the dependency on the deprecated packageMicrosoft.AspNetCore.Localization
?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions