dotnet-template-samples icon indicating copy to clipboard operation
dotnet-template-samples copied to clipboard

Expression/Condition in parameter default value

Open jnevins-gcm opened this issue 5 years ago • 2 comments

Is there a way to make a parameter defaultValue conditional/based on an expression?

I want to have


		"fileToRename": {
			"type": "parameter",
			"datatype": "string",
                        "defaultValue": "if(boolParam) then TheSpecialFile.txt else TheFile.txt",
			"replaces": "TheFile.txt",
			"fileRename": "TheFile.txt"
		},

jnevins-gcm avatar Aug 10 '18 16:08 jnevins-gcm

Hi, is there anyone that can reply to this? A simple yes/no would suffice.

jnevins-gcm avatar Aug 28 '18 17:08 jnevins-gcm

Hi @jnevins-gcm can you post this to https://github.com/dotnet/templating/issues instead of here? You're much more likely to get a timely reply there.

sayedihashimi avatar Aug 29 '18 20:08 sayedihashimi