Skip to content

Conversation

@RikkiGibson
Copy link
Member

@RikkiGibson RikkiGibson commented Feb 12, 2026

Fixes microsoft/vscode-dotnettools#2789

with() is in preview langversion only at this time. So C# 14 users shouldn't be recommended to use it.

case MessageID.IDS_FeatureCollectionExpressionArguments:
return LanguageVersion.Preview;

@RikkiGibson RikkiGibson requested a review from a team as a code owner February 12, 2026 19:45
@RikkiGibson RikkiGibson changed the title Do not suggest using with-expr in pre-C# 15 Do not suggest using with-element in pre-C# 15 Feb 12, 2026
@RikkiGibson RikkiGibson enabled auto-merge (squash) February 12, 2026 20:08
@RikkiGibson RikkiGibson disabled auto-merge February 12, 2026 21:18
@RikkiGibson RikkiGibson enabled auto-merge (squash) February 12, 2026 21:18
@RikkiGibson RikkiGibson merged commit 8625321 into dotnet:main Feb 12, 2026
24 of 25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C# suggests using collection expression arguments even though LangVersion is set to 14 and .NET 11 Preview 1 is not installed

4 participants