-
Notifications
You must be signed in to change notification settings - Fork 34
Description
BlazorExtensions/Storage 1.1.0-preview3 issue:
Similar to issue #35 "Could not find 'BlazorExtensions' in 'window' (Server mode)", but client side:
After updating from ASP .NET 3.0 to latest 3.1 Microsoft.AspNetCore.Blazor (3.1.0-preview4.19579.2), I had to change the injection to the related interfaces to compile:
using Blazor.Extensions.Storage;
using Blazor.Extensions.Storage.Interfaces;
The first "using" statement seems not necessary any more.
And injection also changed from the class "SessionStorage" to the new interface style "ISessionStorage":
[Inject] protected ISessionStorage SessionStorage { get; set; }
But after compiling successfully, I also receive the following exception (similar to server side issue):
WASM: Microsoft.JSInterop.JSException: Could not find 'BlazorExtensions' in 'window'. blazor.webassembly.js:1:35158
printErr http://localhost:58811/_framework/blazor.webassembly.js:1
put_char http://localhost:58811/_framework/wasm/mono.js:1
write http://localhost:58811/_framework/wasm/mono.js:1
write http://localhost:58811/_framework/wasm/mono.js:1
doWritev http://localhost:58811/_framework/wasm/mono.js:1
_fd_write http://localhost:58811/_framework/wasm/mono.js:1
http://localhost:58811/_framework/wasm/mono.wasm:400200
http://localhost:58811/_framework/wasm/mono.wasm:403904
http://localhost:58811/_framework/wasm/mono.wasm:17263
http://localhost:58811/_framework/wasm/mono.wasm:190639
http://localhost:58811/_framework/wasm/mono.wasm:739184
http://localhost:58811/_framework/wasm/mono.wasm:148347
http://localhost:58811/_framework/wasm/mono.wasm:500900
http://localhost:58811/_framework/wasm/mono.wasm:501148
http://localhost:58811/_framework/wasm/mono.wasm:330473
http://localhost:58811/_framework/wasm/mono.wasm:477291
http://localhost:58811/_framework/wasm/mono.wasm:893930
http://localhost:58811/_framework/wasm/mono.wasm:895281
http://localhost:58811/_framework/wasm/mono.wasm:751234
_mono_background_exec http://localhost:58811/_framework/wasm/mono.js:1
pump_message http://localhost:58811/_framework/wasm/mono.js:1
What is the reasons for this? It seems as if the client side can not access the BlazorExtensions out of the box any more (which worked fine using .NET Core 3.0 and Blazor.Extensions.Storage 1.0).