Unify LangVersion to "latest" across projects#10766
Merged
jonathanpeppers merged 2 commits intomainfrom Feb 5, 2026
Merged
Conversation
Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update C# LangVersion to latest across projects
Unify LangVersion to "latest" across projects
Feb 4, 2026
jonathanpeppers
approved these changes
Feb 5, 2026
There was a problem hiding this comment.
Pull request overview
This PR standardizes C# language version settings across the repository by removing explicit LangVersion declarations from four project files, allowing them to inherit the default latest setting from Configuration.props.
Changes:
- Removed explicit
LangVersiondeclarations from four project files that either duplicated the repository default or were pinned to older versions - All affected projects now inherit
LangVersionset tolatestfromConfiguration.propsline 48
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Mono.Android.Runtime/Mono.Android.Runtime.csproj | Removed C# 10 version pin, now inherits latest |
| src/Microsoft.Android.Sdk.Analysis/Microsoft.Android.Sdk.Analysis.csproj | Removed redundant latest declaration |
| src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj | Removed redundant latest declaration |
| build-tools/xaprepare/xaprepare/xaprepare.csproj | Removed redundant $(LangVersion) reference |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multiple projects had explicit
LangVersionsettings that conflicted with or duplicated the repository default oflatestinConfiguration.props.Changes
Removed explicit
LangVersiondeclarations from:src/Mono.Android.Runtime/Mono.Android.Runtime.csproj— was pinned to10src/Microsoft.Android.Sdk.Analysis/Microsoft.Android.Sdk.Analysis.csproj— redundantlatestsrc/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj— redundantlatestbuild-tools/xaprepare/xaprepare/xaprepare.csproj— redundant$(LangVersion)All projects now inherit from the central default:
Out of scope
External submodules (
external/Java.Interop,external/xamarin-android-tools) have their ownLangVersionsettings and should be updated in their respective repositories.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.