templating How does --target-framework-override work? The templates suggest it should be --TargetFrameworkOverride - Csharp
I can't understand why --target-framework-override
is the acceptable parameter with dotnet new console
. According to the template:
"symbols": {
"TargetFrameworkOverride": {
"type": "parameter",
"description": "Overrides the target framework",
"replaces": "TargetFrameworkOverride",
"datatype": "string",
"defaultValue": "",
"displayName": "Target framework override"
},
The parameter should be --targetframeworkoverride
, yet when you try that, it gives an error stating the parameter doesn't exist. Can someone explain this?
Asked Oct 14 '21 08:10
Thraka
1 Answer:
@Thraka
It is possible to define short (with -
) and long (with --
) option override in dotnetcli.host.json file located along with template.json
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"TargetFrameworkOverride": {
"isHidden": "true",
"longName": "target-framework-override",
"shortName": ""
},
For most of .NET templates, the host file is defining the long name override for TargetFrameworkOverride
as target-framework-override
. Also it hides it from help output.
We also have an issue to discuss usage of this parameter in next releases, please note that it might be removed.
1
Answered Oct 04 '21 at 11:18
vlada-shubina
Read next
- [backlog] Ingest, Automatic creation of labels -> include attributes - Python diffgram
- [BUG]: CoE Power BI Dashboard Cannot Export Underlying Data - powerapps-tools
- web.dev - content: Preventing FLoC misunderstanding JavaScript
- psalm issues around usage of `global` keyword - PHP
- [Enhancement] Add list of used topics to KafkaConnector statuses - Java strimzi-kafka-operator
- every field in solr index stored as array - Python django-haystack
- Any plans to include table component ? - chakra-ui TypeScript
- tailwind-rn - Vue Native JavaScript