templating
templating copied to clipboard
Evaluate supporting baseline in dotnet new and template engine
Currently template engine supports baseline: set of predefined input parameters that can be used when running or filtering templates.
dotnet new
supports --baseline
switch, but for now it is hidden.
Evaluate do we need this feature enabled for .NET 7, keep it hidden as is or should we remove it.
Some open questions for me to investigate:
- Need to run down places where this feature is currently used - this should be easily doable from the search manifest
- Some code/design archeology to run down the history/driving use case of the feature
Internal Usage:
- dotnet/templating - used to set the
Framework
parameter in the class library templates - dotnet/aspnetcore - not used
- dotnet/winforms - not used
- dotnet/maui - not used
External Usage:
-
Falanx.Templates
- sets the Framework like the dotnet/templating templates do
-
Dynamensions.Templates.Discord
- sets the Framework like the dotnet/templating templates do
-
ZTR.Utilities.Templates
- sets the Framework like the dotnet/templating templates do
-
RandomChance.Common.Templates
- sets the Framework like the dotnet/templating templates do
All of the external usage feels very copy/pasted from our templates to me. This isn't surprising, given that we don't have a template-for-templates. I don't think that this functionality is very widely used at the moment. There is a potential use case for it as a solution to https://github.com/dotnet/templating/issues/3654, however.
No change to this behavior in scope of #2191, the baseline option remains hidden. Keeping the issue open for discussions.
We should deprecate baseline
- it's not widely used in the ecosystem and where it is used we have no evidence that template users actually use the baselines.
As it was agreed to deprecate baseline, we need to make all code that uses it obsolete. The action is purely refactoring, until obsolete code is agreed to be removed.
Consider removing --baseline
option from CLI or make it obsolete.