diff --git a/src/Components/Components/src/PlatformInfo.cs b/src/Components/Components/src/PlatformInfo.cs
index 2ed3ace3b9..e1de5ff13b 100644
--- a/src/Components/Components/src/PlatformInfo.cs
+++ b/src/Components/Components/src/PlatformInfo.cs
@@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Components
static PlatformInfo()
{
- IsWebAssembly = RuntimeInformation.IsOSPlatform(OSPlatform.Browser);
+ IsWebAssembly = RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
}
}
}
diff --git a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs
index 89ed322562..71a06a15ec 100644
--- a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs
+++ b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs
@@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Components.Web.Extensions
protected ProtectedBrowserStorage(string storeName, IJSRuntime jsRuntime, IDataProtectionProvider dataProtectionProvider)
{
// Performing data protection on the client would give users a false sense of security, so we'll prevent this.
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Browser))
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")))
{
throw new PlatformNotSupportedException($"{GetType()} cannot be used when running in a browser.");
}
diff --git a/src/Components/WebAssembly/WebAssembly/src/Services/LazyAssemblyLoader.cs b/src/Components/WebAssembly/WebAssembly/src/Services/LazyAssemblyLoader.cs
index 74e6ee705f..709c0f576c 100644
--- a/src/Components/WebAssembly/WebAssembly/src/Services/LazyAssemblyLoader.cs
+++ b/src/Components/WebAssembly/WebAssembly/src/Services/LazyAssemblyLoader.cs
@@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Services
/// A list of the loaded
public async Task> LoadAssembliesAsync(IEnumerable assembliesToLoad)
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Browser))
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")))
{
return await LoadAssembliesInClientAsync(assembliesToLoad);
}