Skip to content

Unify LangVersion to "latest" across projects#10766

Merged
jonathanpeppers merged 2 commits intomainfrom
copilot/unify-langversion-to-latest
Feb 5, 2026
Merged

Unify LangVersion to "latest" across projects#10766
jonathanpeppers merged 2 commits intomainfrom
copilot/unify-langversion-to-latest

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

Multiple projects had explicit LangVersion settings that conflicted with or duplicated the repository default of latest in Configuration.props.

Changes

Removed explicit LangVersion declarations from:

  • src/Mono.Android.Runtime/Mono.Android.Runtime.csproj — was pinned to 10
  • src/Microsoft.Android.Sdk.Analysis/Microsoft.Android.Sdk.Analysis.csproj — redundant latest
  • src/Microsoft.Android.Sdk.Analysis/Tests/Microsoft.Android.Sdk.Analysis.Tests.csproj — redundant latest
  • build-tools/xaprepare/xaprepare/xaprepare.csproj — redundant $(LangVersion)

All projects now inherit from the central default:

<!-- Configuration.props:48 -->
<LangVersion Condition=" '$(LangVersion)' == '' ">latest</LangVersion>

Out of scope

External submodules (external/Java.Interop, external/xamarin-android-tools) have their own LangVersion settings and should be updated in their respective repositories.

Original prompt

This section details on the original issue you should resolve

<issue_title>Unify LangVersion to "latest" across projects</issue_title>
<issue_description>### Android framework version

net11.0-android (Preview)

Affected platform version

.NET 11

Description

There are many different C# versions used throught the projects in the repo. It would be beneficial to unify all to latest. Is there anything preventing us from increasing the language version in some case?

Steps to Reproduce

Did you find any workaround?

No response

Relevant log output

```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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
Copilot AI requested a review from simonrozsival February 4, 2026 18:36
@jonathanpeppers jonathanpeppers marked this pull request as ready for review February 5, 2026 14:04
Copilot AI review requested due to automatic review settings February 5, 2026 14:04
@jonathanpeppers jonathanpeppers merged commit 456294a into main Feb 5, 2026
6 of 10 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/unify-langversion-to-latest branch February 5, 2026 14:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 LangVersion declarations from four project files that either duplicated the repository default or were pinned to older versions
  • All affected projects now inherit LangVersion set to latest from Configuration.props line 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify LangVersion to "latest" across projects

3 participants