blazor-webassembly.net-5.net-standard-2.1

Blazor WASM TargetFrameworks netstandard 2.1 and net5.0


I have a dotnet 3.1 blazor wasm hosted app using the oracle ef core provider.

I would like to upgrade the blazor wasm app to net5.0 but can't do it, because I can not upgrade my asp.net core project until oracle releases a ef core provider that's supports net5.0.

I have been trying to multitarget the blazor project but can't make it work. my asp.net project can't see that it's also a netstandard2.1 project.

Can it be done?


Solution

  • You can not have multi target Blazor WASM app, as the code for .NET 5 is different as well. netstandard2.1 project is using Microsoft.NET.Sdk.Web SDK but net5.0 project is using Microsoft.NET.Sdk.BlazorWebAssembly SDK. Also netstandard2.1 project is using some packages such as Microsoft.AspNetCore.Components.WebAssembly.Build which is not used on .NET 5 version and so on...