Skip to content

Conversation

@rolfbjarne
Copy link
Member

This way we can detect and fix any problems when building against newer .NET versions.

Also fix any problems, and turn on warnings as errors.

This way we can detect and fix any problems when building against newer .NET versions.

Also fix any problems, and turn on warnings as errors.
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 adds multi-targeting support to build against .NET 10.0 in addition to existing target frameworks, and enables treat warnings as errors for improved code quality. The changes also update certificate loading code to use the newer X509CertificateLoader API when building for .NET 9.0 or greater.

Changes:

  • Added net10.0 as an additional target framework for Xamarin.MacDev and UnitTests projects
  • Enabled TreatWarningsAsErrors in both project files
  • Updated certificate loading to use X509CertificateLoader.LoadCertificate for .NET 9+ while maintaining backward compatibility with X509Certificate2 constructor for older frameworks

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Xamarin.MacDev/Xamarin.MacDev.csproj Added net10.0 target framework and enabled warnings as errors
UnitTests/UnitTests.csproj Enabled warnings as errors
Xamarin.MacDev/MobileProvision.cs Added conditional compilation to use X509CertificateLoader for .NET 9+
Xamarin.MacDev/Keychain.cs Added conditional compilation to use X509CertificateLoader for .NET 9+ in two methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rolfbjarne rolfbjarne merged commit f3c7f0e into dotnet:main Jan 15, 2026
8 checks passed
@rolfbjarne rolfbjarne deleted the multi-target branch January 15, 2026 14:04
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.

3 participants