Dotnet Core Templates, or DOTNET new -i “the magic”
Time to touch on this topic again… because every time a new DOTNET SDK comes out I seem to lose the new templates. I understand the why, and ya I wish the .Net Core group would fix it.
The “why”- each time one updates to a new Core SDK, the template scaffolds get placed into a new folder (usually under your users directory in a annoying place like ….\.templateengine\dotnetcli\”version of sdk”\). So each time you move to a new DOTNET SDK, this becomes a problem.
The second part of of DOTNET new -i that is an issue, is if you have different nuget repositories set in VS. It’s a great feature in VS 2017 where one can add additional package management sources… problem is with the DOTNET command line when you want to bring in new templates.
So, why am I going on about this? Well as I move from SDK version to version… I would like the damn templates I’ve added to either get updated (the standard ones do), or at least make sure they are available to the new SDK…. How hard can it be….
So here’s the list of what I keep installing from (dotnet Templates on github)
Here’s my list:
dotnet new -i “Microsoft.AspNetCore.SpaTemplates::*” – this one always
dotnet new -i “Boxed.Templates::*” – I’m still undesided about boxed.
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::* – nice little framework that has become a 1st class citizen in VS. Make sure you also check out the VS extension.
dotnet new -i “RaspberryPi.Template::*” – who does not like Iot stuff. Also available in VS as a 1st class citizen.
Update: So as we now have SDK version… 2.1.400 I notice that some of the SPA templates remain off the list…
The SPA templates after SDK update:
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with React.js react [C#] Web/MVC/SPA
ASP.NET Core with React.js and Redux reactredux [C#] Web/MVC/SPA
And the templates after the dotnet new -i of the SPA’s:
ASP.NET Core with Aurelia aurelia [C#] Web/MVC/SPA
ASP.NET Core with Knockout.js knockout [C#] Web/MVC/SPA
ASP.NET Core with Vue.js vue [C#] Web/MVC/SPA
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with React.js react [C#] Web/MVC/SPA
ASP.NET Core with React.js and Redux reactredux [C#] Web/MVC/SPA
The ones in bold seem to gone still…. oh well.