Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use `dotnet new` template in visual studio 2019?

I installed Visual Studio 2019 GA Released version today.

I installed this template https://github.com/Dotnet-Boxed/Templates via dotnet new command line

I then can use the dotnet new to create a project from command line.

However, the installed template does not show in this windows in Visual Studio 2019.

What the point of putting the link to install a new template from CLI but not listing new installed template in the UI?

Is this a bug or actually a missing feature?

Create Asp.NET core

like image 437
LxL Avatar asked Nov 17 '22 11:11

LxL


1 Answers

https://devblogs.microsoft.com/dotnet/net-cli-templates-in-visual-studio/

in this post you can see how to enable .net core cli project templates in VS2019

Starting in Visual Studio 16.8 Preview 2 we’ve enabled a preview feature that you can turn on that enables all templates that are installed via CLI to now show as options in Visual Studio as well. To enable this option visit the Preview Features options in the Tools…Options menu and look for the “Show all .NET Core templates in the New Project dialog” (we’re awesome at naming) checkbox and check it:

enter image description here

After enabling you need to restart the Visual Studio instance to get this capability. After restarting and choosing to create a new project you’ll see some slight differences in the experience.

like image 158
Reza Rezazadeh Avatar answered Dec 25 '22 11:12

Reza Rezazadeh