Loading episodes…
0:00 0:00

Creating a Blazor WebAssembly Project

00:00
BACK TO HOME

Creating a Blazor WebAssembly Project

10xTeam August 29, 2020 2 min read

In this article, we’ll learn about Blazor WebAssembly and we’ll see how to create a project using Visual Studio and dotnet CLI.

Starting with Visual Studio 16.6.3 and .NET core 3.1.301 you can create Blazor applications for both server and client/WebAssembly.

What’s Blazor WebAssembly?

WebAssembly or WASM is a binary instruction set supported by modern browsers. It can be used to run code generated from high level programming languages such as C# which means it provides the possibility for developers to create client-side web applications with these programming languages without resorting to JavaScript JavaScript or using plugins, Java applets.

With Blazor WebAssembly, you can run the code the web browser as a SPA (Single Page Application).

Creating a New Blazor WebAssembly Project

You can use Visual Studio to create a new Blazor project by following these steps:

  • First, create a new project and look for the Blazor App template
  • You’ll be able to choose between creating a Blazor Server App or Blazor WebAssembly App

If you prefer the command-line interface, you can use the dotnet CLI to create your project.

Head over to a new command-line interface and run the following command:

$ dotnet new blazorwasm -o your-project-name

Next, navigate to your project’s folder and run a local development server using the following commands:

$ cd your-project-name
$ dotnet run

You can then open your web browser and visit your the application from the https://localhost:5001/ address.


Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Audio Interrupted

We lost the audio stream. Retry with shorter sentences?