templating
templating copied to clipboard
Consider adding supported framework version to list output
Talking to @shanselman he's suggesting that we display the supported framework version in the output of dotnet new --list
.
Thoughts?
Current:
Templates Short Name Language Tags
--------------------------------------------------------------------------------------------------------
Console Application console [C#], F#, VB Common/Console
ASP.NET Core Empty web [C#] Web/Empty
ASP.NET Core MVC Basic mvcbasic [C#] Web/MVC
Suggested, very similar to Language
Templates Short Name Language Version(s) Tags
-----------------------------------------------------------------------------------------------------
Console Application console [C#], F#, VB [2.0], 1.1, 1.0 Common/Console
ASP.NET Core Empty web [C#] [2.0] Web/Empty
ASP.NET Core MVC Basic mvcbasic [C#] [2.0], 1.1 Web/MVC
That would be a lot nicer!
This concerns me in the context of class library. It supports netstandard1.0
... netstandard1.6
, netstandard2.0
, netcoreapp1.0
, netcoreapp1.1
, netcoreapp2.0
which will get super long & we've already had issues with the table getting too wide.
Moreover, these versions are expressed as the full value for TargetFramework - trimming to the major/minor will work as long as the TFM prefix is the same, but for netstandard/netcoreapp this will introduce ambiguity.
I'm for this change, but I think we need to find the right way to express it.
Good point @mlorbetske. Are those values the same as the ones they pass in with -framework? Perhaps some abbreviation like s2.0 or a1.0 with a legend at the bottom.
Yep, those are the same values accepted by --framework. Short forms of the TFMs are interesting, we can do that.
cc @KathleenDollard
I'm in favor of this, but the length of TFMs relative to user console sizes makes me want a better table representation. The TFMs should be stacked vertically in the column, which would add vertical spacing if required.
Templates Short Name Language Framework(s) Tags
-----------------------------------------------------------------------------------------------------
Console Application console [C#], F#, VB [net7.0] Common/Console
net6.0
Class Library classlib [C#], F#, VB [netstandard2.0] Common/Library
net7.0
net6.0
It turns out that this is really hard to do in our current hand-rolled table implementation, though. It would be much easier if we could reference Spectre.Console or something to abstract away the layout.