Possible to enable and disable parameters based on HostIdentifier? #7887
Unanswered
Banner-Keith
asked this question in
Template authoring
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to get feature parity between CLI and Visual Studio.
In Visual Studio you can decide if you want to add a new project template to an existing solution or create a whole new solution.
In command line I can replicate this by having a parameter that can be passed. In this case I have named it
CreateSolution
. But I don't want that parameter to show up in Visual Studio.I understand the hooks for
isEnabled
don't really exist yet, so I am not too worried about this, but it'd be nice for my template to be ready if that feature is added.Example configuration:
I am running my template with
--verbosity diagnostic
and in the output I see this:[Debug] [Template Engine] => [Execute] => [Template content generation]: [HostParametersBindSource]: Retrieved bound value for 'HostIdentifier': 'dotnetcli'.
Which means the
HostIdentifier
is binding correctly my symbol. ButCreateSolution
is always disabled and doesn't even show up in the debug output. I suspect that maybe theHostIdentifier
value is being bound after the isEnabled value is evaluated.Beta Was this translation helpful? Give feedback.
All reactions