Blazor: ProtectedBrowserStorage feature moved to shared framework
As part of the ASP.NET Core 5.0 RC2 release, the ProtectedBrowserStorage
feature moved to the ASP.NET Core shared framework.
Version introduced
5.0 RC2
Old behavior
In ASP.NET Core 5.0 Preview 8, the feature is available as a part of the Microsoft.AspNetCore.Components.Web.Extensions package but was only usable in Blazor WebAssembly.
In ASP.NET Core 5.0 RC1, the feature is available as part of the Microsoft.AspNetCore.Components.ProtectedBrowserStorage package, which references the Microsoft.AspNetCore.App
shared framework.
New behavior
In ASP.NET Core 5.0 RC2, a NuGet package reference is no longer needed to reference and use the feature.
Reason for change
The move to the shared framework is a better fit for the user experience customers expect.
Recommended action
If upgrading from ASP.NET Core 5.0 RC1, complete the following steps:
- Remove the
Microsoft.AspNetCore.Components.ProtectedBrowserStorage
package reference from the project. - Replace
using Microsoft.AspNetCore.Components.ProtectedBrowserStorage;
withusing Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
. - Remove the call to
AddProtectedBrowserStorage
from yourStartup
class.
If upgrading from ASP.NET Core 5.0 Preview 8, complete the following steps:
- Remove the
Microsoft.AspNetCore.Components.Web.Extensions
package reference from the project. - Replace
using Microsoft.AspNetCore.Components.Web.Extensions;
withusing Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
. - Remove the call to
AddProtectedBrowserStorage
from yourStartup
class.
Affected APIs
None