-
Notifications
You must be signed in to change notification settings - Fork 982
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
added support of C#11 to templates #7645
Conversation
@merriemcgaw @RussKie please help to review and ensure it gets to 7.0, thank you. do you have any automation tests to cover this change? cc: @baronfel |
The SDK version of this same fix was just approved for merge, so this should be merge-able as well for 7.0: dotnet/sdk#27361 |
@baronfel , I missed part of the discussion in tactics. Is that sdk branch pointing RC1 or RC2? |
It's on the 'base' 7.0.1xx branch, which right now is RC2. |
/backport to main |
Started backporting to main: https://github.com/dotnet/winforms/actions/runs/2913582126 |
Unfortunately we don't. Still waiting for dotnet/templating#3868 ;) |
Problem
In the templates, the generators which determine minimum language version in use were not considering C#11.
Fixed regex to support it.
Customer impact
Without this fix, using C# 11.0 via
--langVersion
option will result in old style template (no top level statements, file scoped namespaces, implicit usings)Testing
Automated
Risk
Very low.
Language version option is only available in CLI and not exposed in Visual Studio.
Microsoft Reviewers: Open in CodeFlow