Skip to content
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

Clarify Language Version Selection in Visual Studio Documentation. #43565

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

shethaadit
Copy link
Contributor

@shethaadit shethaadit commented Nov 13, 2024

Summary

Added a new section, "Why can't I select a different C# version?", explaining that Visual Studio links the language version to the target framework to ensure compatibility. The section:

  • Clarifies that the language version aligns with the TFM to maintain runtime support and prevent build issues.
  • Provides a practical example: changing the target TFM, such as from .NET 6 to .NET 9, automatically updates the language version, such as from C# 10 to C# 13.
  • Guides users on how to set the language version manually if required, referencing the relevant Edit the project file and Configure multiple projects sections.

Fixes #43428


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/configure-language-version.md Configure C# language version

@shethaadit shethaadit requested review from BillWagner and a team as code owners November 13, 2024 20:53
@dotnetrepoman dotnetrepoman bot added this to the November 2024 milestone Nov 13, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label Nov 13, 2024
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @shethaadit

I had a couple grammar suggestions, and then I'll :shipit:

@BillWagner BillWagner enabled auto-merge (squash) November 14, 2024 15:26
@BillWagner BillWagner merged commit ee056e4 into dotnet:main Nov 14, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc lang-reference/subsvc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Why can't I select a different C# version?" not addressed
2 participants