-
Notifications
You must be signed in to change notification settings - Fork 548
.NET 10 release notes
Warning
This document is still work-in-progress/incomplete, and also contains references to potential future changes which may or may not happen.
We're excited to announce our .NET 10 SDK release!
Note: these are the base SDKs that add support for the platforms in question, if you are looking for .NET MAUI (which is built on top of our SDKs), go here instead: https://docs.microsoft.com/en-us/dotnet/maui/.
Getting Started | What's New | Known Issues | Feedback | FAQ
This release consists of the following versions:
This release requires Xcode 26.0+ (which requires macOS 15.6 (Sonoma)).
With the release the minimum supported OS versions can be targeted for apps:
- iOS: 12.2
- macOS: 12
- tvOS: 12.2
- Mac Catalyst: 15.0
Note: while we support macOS 12, we're only testing on OS versions that Apple supports. At the time of this writing this means we're only testing on macOS 13+.
The first step is to install .NET 10.0.100 (or later).
Then install the workload corresponding with the desired platform:
$ dotnet workload install ios # other workloads: macos, tvos, and maccatalyst
Create new app from a template with:
$ dotnet new ios # 'dotnet new --list --tag Mobile' will show all available templates
Finally build and run the new app in the simulator
$ dotnet run
This release contains SDKs for the following four platforms: iOS, tvOS, Mac Catalyst and macOS, and has support and bindings for the OS versions that were shipped with Xcode 26.0:
- iOS 26.0
- macOS 26.0
- tvOS 26.0
- Mac Catalyst 26.0
In the past we've suppressed trimmer warnings, because the base class library produced trimmer warnings, which meant that it wouldn't be possible for developers to fix all the trimmer warnings.
However, in .NET 9 we believe we fixed all the trimmer warnings from our own code, so now we're ready to for developers to do the same, and thus we're enabling trimmer warnings by default.
This can be disabled, by adding this to the project file:
<PropertyGroup>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
</PropertyGroup>
Ref: https://github.com/xamarin/xamarin-macios/issues/21293
Library projects can have various types of bundle resources (storyboards, xibs, property lists, png images, CoreML models, texture atlases, etc.), and they're bundled into the compiled library as embedded resources.
If any processing can be done (such as compiling storyboards or xibs, or optimizing property lists/png images, etc), this has historically been done before embedding, but this complicates library builds a lot, because this processing:
- Needs to run on a Mac, because compiling xibs/storyboards can only be done on a Mac.
- Needs Apple's toolchain around.
- Makes it impossible to do any decision-making based on the original resources when building the app.
So we've added opt-in support for embedding the original resource in libraries in .NET 9, and making it opt-out in .NET 10.
The default behavior can be changed in the project file like this:
<PropertyGroup>
<BundleOriginalResources>false</BundleOriginalResources>
</PropertyGroup>
Ref: https://github.com/xamarin/xamarin-macios/issues/19028
Binding projects are now built entirely on Windows, there's no need for a remote Mac anymore.
This makes building binding projects on Windows significantly faster.
We've added support for Xcode 26 + many new APIs in iOS 26, tvOS 26, macOS 26 and Mac Catalyst 26.
The trimmer is now enabled in the following configurations:
- iOS Simulator/arm64 (all configurations)
- tvOS Simulator/arm64 (all configurations)
- Mac Catalyst/arm64 (all configurations)
Reference: https://github.com/xamarin/xamarin-macios/issues/21444
Launching a mobile app (iOS, tvOS):
- Use the following command to get a list of all the simulators or devices:
$ dotnet build -t:ShowRunHelp
or:
$ dotnet run -p:Help=true
- Choose a simulator or device from the list, copy the name or identifier, and then run, setting
DeviceName
to the selected device:
dotnet run -p:DeviceName={my-simulator-or-device}
Note
When running on device, it's necessary to pass the runtime identifier to dotnet run
: dotnet run -r ios-arm64 -p:DeviceName={...}
Important
If the project file has multiple target frameworks, it's necessary to choose which one: dotnet run -f net10.0-ios ...
Launching an app on desktop (macOS, Mac Catalyst):
Just dotnet run
works just fine to launch the app.
If something goes wrong (the app crashes, etc.), it's often useful to see
stdout and stderr (Console.Out / Console.Error) from the app (this can even be
useful as a debugging mechanism in certain cases). In order to see this
output, it's necessary to execute the actual macOS executable directly, and
this can be accomplished by passing RunWithOpen=false
to dotnet run
:
$ dotnet run -p:RunWithOpen
[output]
Important
If the project file has multiple target frameworks, it's necessary to choose which one: dotnet run -f net10.0-maccatalyst ...
Previously, NSUrlSessionHandler would initialize the NSUrlSessionConfiguration's TLSMinimumSupportedProtocol value from ServicePointManager.SecurityProtocol, but ServicePointManager is now deprecated.
This means developers will have to set NSUrlSessionConfiguration.TlsMinimumSupportedProtocolVersion before creating the NSUrlSessionHandler:
var sessionConfiguration = NSUrlSessionConfiguration.DefaultSessionConfiguration;
sessionConfiguration.TlsMinimumSupportedProtocolVersion = TlsProtocolVersion.Tls13;
var handler = new NSUrlSessionHandler (sessionConfiguration);
References:
- https://github.com/dotnet/macios/pull/22517
- https://aka.ms/dotnet-warnings/SYSLIB0014
- https://github.com/dotnet/runtime/issues/62770
The NSUrlSessionHandler.BypassBackgroundSessionCheck property is a workaround for an old issue in the Mono runtime.
This issue was fixed years ago, and as such the workaround is no longer required.
We've added validation to detect if multiple different resources targets the same location in the app bundle, in which case we'll now:
- Issue a build warning when this situation is detected.
- Not copy any of the resources into the app bundle (previous behavior was undefined, any of the resources could end up winning).
One scenario where this has known to cause problems is in MAUI projects, when:
- There are resources in the Platforms/iOS/Resources directory.
- The project file adds any of these resources to the build, as
MauiImage
items for instance.
This leads to duplicates, because:
- All resources in the Platforms/iOS/Resources directory are added to the build by default.
- MAUI will process (resize)
MauiImage
items, and add those resized images to the build.
There are multiple ways to fix this, here are a few:
-
Remove all
MauiImage
from theBundleResource
item group (where they were added by default):<ItemGroup> <!-- ... --> <MauiImage Include="Platforms/iOS/Resources/LastMauiImage.png" /> <BundleResource Remove="@(MauiImage)" /> </ItemGroup>
-
Move the
MauiImage
items to a different directory (sayPlatforms/iOS/MauiImages
, orResources/Images
).
References:
- https://github.com/dotnet/macios/issues/19029
- https://github.com/dotnet/macios/issues/24014
- https://github.com/dotnet/macios/blob/main/dotnet/DefaultCompilationIncludes.md
File issues here: https://github.com/xamarin/xamarin-macios/issues/new.