-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force parameters to be specified if another is specified #2173
Comments
The issue suggests a new feature which doesn't exist yet. Moved to Template Engine backlog. |
The simplest way to do this would be to require a change to System.CommandLine, since it will be our parser and it does not support this. That would allow the parser to do the validation. We could probably also do it in a post-validation step, but lets see whether we have other post validation needs after we move to the new parser. I do not want to do this unless we find a way to express this clearly in help. Having this dependency without being able to communicate it does not seem helpful. OTOH, this problem is real. Let's leave this on the backlog and review after we have the new parser in place. |
If this affects your templates, let us know. I have the ASP.NET Auth templates in mind on this, but if there are other scenarios, please add them. |
Related use case is: #4102 - disable parameter B when parameter A is not specified. |
If we do this work we should coordinate to ensure that we can properly support this in VS. |
This is now possible via https://github.com/dotnet/templating/wiki/Conditions#conditional-parameters feature, closing as done. |
Documentation doesn't indicate this is already a feature but it would be nice if specifying one parameter forces other parameters to required only if that initial parameter is used.
The text was updated successfully, but these errors were encountered: