-
Notifications
You must be signed in to change notification settings - Fork 359
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
Conditions Don't Work With Multi Choices #7441
Comments
I seem to only be getting this issue when I try to use my template in VS 2022, when I use the cli it seems to work proper. |
Adding @phenning since you mentioned this is specific to VS2022. |
It could be other versions of VS but I don't have anything older but yes it just seems to be a problem going through VS and not through command line |
Okay I got a bit of time and uploaded the template to my github: https://github.com/chobo2/VSTemplateExample I installed the template by going to the folder and doing "dotnet new install ." I created a project by going
The first command I expect to be able to go to Program.Cs and see this line
second command I do not expect to see this (I removed MacOS from the default value) I got the expected results in both of them. I moved on to VS 2022 and did the same thing. I created a new project and checked MacOS and then I created another project without MacOS checked. In both instances I did not see Other things to note that I noticed
I get this folder structure of
|
Anyone have any updates on this if I am doing it wrong or if this is a bug? |
Product
Visual Studio
Describe The Bug
Hi
I am trying to do conditions on my multi select choices.
I found this example: https://github.com/dotnet/templating/wiki/Conditions
I copied it as is into my template
When I do this
#if (Platform == MacOS)
// MacOS choice flag specified here
#endif
Does not matter if I choose it or not it always seems to be fall.
I am using NET 8, Blazor 8 and Visual Studio 2022 if that makes any difference
To Reproduce
Follow steps in the link
dotnet Info
output
.NET SDK:
version: 8.0.100
Visual Studio Version
2022
Additional context
No response
The text was updated successfully, but these errors were encountered: