Core LTS templates question

I’m looking to setup some new projects using the web/x/app templates. I want to use the latest dotnet LTS - currently 3.1 rather than 5.0. Do I need to have .NET 5 installed so I can use the latest templates or is there another way? Is there perhaps a way to do it using Docker?

All .NET Core Templates have all been upgraded to .NET 5 since November last year.

To download a .NET Core 3.1 LTS version you can download the release before November 2020 from its releases page:<project>/releases

So for the empty web template:

You would use its v17 release

Which you can download the Source code .zip

But that would still have the template default of MyApp, to have it use your project name you can use the specific .zip URL with x dotnet tool, e.g:

$ x new Acme

But the latest v5.x dotnet tools require .NET 5, to go back to a .NET Core 3 version you’d need to use the latest non v5 release, i.e:

$ dotnet tool install --global x --version 0.0.85

Which I’m not sure if .zip support was properly supported by then or not.

Or you can just use the latest .NET 5, it’s much cleaner / faster release than .NET Core 3.1 LTS and is going to be more compatible when the next .NET 6 LTS is released later this year.

Fantastic, many thanks for the prompt response Mythz

1 Like