HomeAbout Me

Build your first Blazor app(not EXPERIMENTAL anymore)

By Sri Gunnala
Published in Microsoft .NET
August 30, 2019
1 min read
Build your first Blazor app(not EXPERIMENTAL anymore)

Using Blazor, you can build two types of apps. Server-side Blazor runs on the server via SignalR. Client-side Blazor runs client-side on WebAssembly. This post demonstrates the client-side blazor app.

Step-by-step guide to building the first client-side Blazor App.

  1. Install the latest .NET Core 3.0 Preview SDK release (As of writing this post, it is still in official preview) Go to https://dotnet.microsoft.com/download/dotnet-core/3.0 Install below SDK

Microsoft Download
Microsoft Download

  1. Install the Blazor templates by running the following command in a command shell:
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview5–19227–01

Microsoft Download
Microsoft Download

  1. I am using Visual Studio IDE. And this will work with 2019 only. Open visual studio 2019

Install Blazor Extension

Microsoft Download
Microsoft Download

If you are using visual studio preview, you can skip this step as preview SDKs are picked by default. I am using VS 2019 Pro, so I need to tell my VS to use the preview SDKs. Open Tools > Options in the menu bar. Open the Projects and Solutions node. Open the .NET Core tab. Check the box for Use previews of the .NET Core SDK. Select OK. 4. Create a new project ASP.NET Core Web project in VS

Microsoft Download
Microsoft Download

  1. Name your project ‘MyFirstBlazor’

Microsoft Download
Microsoft Download

  1. Make sure .NET Core and ASP.NET Core 3.0 are selected. Choose the Blazor (client-side) template and hit create

Microsoft Download
Microsoft Download

  1. Press F5 to run the app.

  2. All done

Microsoft Download
Microsoft Download

To understand what exactly Blazor is and how it works, follow my post below.


Tags

#blazor#aspdotnetcore
Previous Article
Generic wrapper to consume RESTful API in C#
Sri Gunnala

Sri Gunnala

Learner | Reader | Blogger | Azure Enthusiast

Topics

Front End
Microsoft Azure
Microsoft .NET

Newsletter

Sri Gunnala - Make sure to subscribe to newsletter and be the first to know the news.

Related Posts

Demystifying ASP.NET Core Blazor — Core Concepts and Its Future
October 08, 2019
4 min

Legal Stuff

Privacy NoticeCookie PolicyTerms Of Use

Social Media