Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing Blazor template in VS 2017 .Net core 2.2

I have a Visual Studio Enterprise 2017 with version 15.9.7 and .Net core 2.2 and .Net SDK 2.2.1. I was trying to create a blazor web application following this link. In the article, it shows a template of type Blazor. But I do not get the same template in my visual studio.

On further investigation, I found this link but the prerequisites include Visual Studio 2019 Preview and SDK 3.0 preview. I do not want to jump to them immediately when the versions are still in preview.

So is there no way to get the template in my current configuration? Are there any kind of work around for this?

This is the exact same question but the solution marked does not work in my case.

EDIT 1: I tried installing blazor extension, but it says this extension is not installable on any currently installed products(in my case it is VS 2017).

EDIT 2 : I tried to create the project using CLI, but ended with the error

error NU1202: Package Microsoft.AspNetCore.Blazor.Cli 0.9.0-preview3-19154-02 is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2). Package Microsoft.AspNetCore.Blazor.Cli 0.9.0-preview3-19154-02 supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0)

like image 482
The_Outsider Avatar asked Jan 26 '23 13:01

The_Outsider


1 Answers

In order to use Blazor you will need to upgrade to Visual Studio 2019 and .NET Core 3 preview SDK.

Before VS 2019 all the tooling for building Blazor projects was included in the Blazor Extension for Visual Studio, along with the templates. However, the tooling is now built into VS 2019 directly. The Blazor Extension now only contains project templates.

The good news is that you can install VS 2019 along side any existing stable VS versions you have. The same goes for the preview SDKs of .NET Core.

like image 73
Chris Sainty Avatar answered Jan 29 '23 02:01

Chris Sainty