Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is client-side Blazor using .NET Standard 2.0 and how to use .NET Core 3.0 with Blazor?

Is it possible to use .NET Core 2.2 or 3.0 with Blazor?

Because at this moment, the blazorhosted template creates a client-side project as .NET Standard which prevents using .NET Core 3.0.

Project blazor.Shared is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Project blazor.Shared supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0) blazor.Client C:\app\blazor.Client\blazor.Client.csproj 1

After changing everything to .NET Core 3.0, I get the following error:

rzc generate exited with code 1.

So, is it possible and I'm doing something wrong or is there no way yet?

like image 445
Axelly Avatar asked Jan 20 '19 02:01

Axelly


People also ask

Does Blazor use .NET core?

Blazor Server provides support for hosting Razor components on the server in an ASP.NET Core app. UI updates are handled over a SignalR connection. The runtime stays on the server and handles: Executing the app's C# code.

What is Blazor client-side?

Client-side Blazor makes use of WebAssembly, which is used to run high-level languages on browsers. Necessary . NET WebAssembly-related code and its dependencies are downloaded to the browser, and the app is executed directly on the browser UI thread. All UI updates and event handling occur within the same process.

Is Blazor a client-side server?

The Blazor web framework allows Razor components to be hosted in different ways. They can run server-side in ASP.NET Core (Blazor Server) and client-side in the browser on a WebAssembly-based . NET runtime (Blazor WebAssembly or Blazor WASM).

What framework does Blazor use?

Interactive web UI with C# Both client and server code is written in C#, allowing you to share code and libraries. Blazor is a feature of ASP.NET, the popular web development framework that extends the . NET developer platform with tools and libraries for building web apps.


1 Answers

Client side Blazor runs on the Mono WASM runtime, and that only supports netstandard 2.0 ATM. The announcement of Blazor in Core refers to server side Blazor. The two are compatible code wise but the underlaying runtime technique is totally different.

like image 190
Flores Avatar answered Oct 11 '22 00:10

Flores