-
Notifications
You must be signed in to change notification settings - Fork 515
.NET 9 release notes
We're excited to announce our .NET 9 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:
It's highly recommended to use Xcode 16.0+ (which requires macOS 14.5 (Sonoma) or macOS 15.0 (Sequoia). Earlier versions of Xcode may work, but some features won't be available.
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 getting started is to install .NET 9.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 16.0:
- iOS 18.0
- macOS 15.0
- tvOS 18.0
- Mac Catalyst 18.0
In .NET 8 we released experimental support for NativeAOT, and we're now happy to announce that starting in .NET 9, NativeAOT is fully supported.
Our initial testing shows significant improvements both in size (up to 50% smaller) and startup (up to 50% faster), so we're encouraging developers to try it out and report back their findings.
More information about our NativeAOT support can be found here.
We've fixed all the trimming warnings in our SDK, which means it's now possible to enable trimming warnings without getting a lot of noise. In fact, we've enabled trimmig warnings by default already when NativeAOT is enabled.
In order to always trimming warnings if NativeAOT is not enabled, add this to the project file:
<PropertyGroup>
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
</PropertyGroup>
Note: this will still raise numerous warnings if no assemblies are trimmed
with MtouchLink=None
or TrimMode=copy
.
In .NET 8 we introduced a new type registrar: managed-static
primarily for supporting NativeAOT runtime. Due to the performance benefits that it brings, in .NET 9 we are enabling managed-static
to be the new default registrar for all supported runtimes affecting the following configurations:
-
iOS
andtvOS
device builds in all configurations -
macOS
andMacCatalyst
builds in release configuration
NOTE: simulator builds are not affected
Even though the new registrar is typically faster, it can also negatively impact the application size.
Based on preliminary testing the size regression of a template MAUI iOS application with Mono varies between 2-3%
.
For customers, for whom application size is critical, it is possible to opt-out from using the new default by adding the following MSBuild target to your project file:
<Target Name="SelectStaticRegistrar" AfterTargets="SelectRegistrar">
<PropertyGroup Condition="'$(Registrar)' == 'managed-static'">
<Registrar>static</Registrar>
</PropertyGroup>
</Target>
- @jkurdek made their first contribution in https://github.com/xamarin/xamarin-macios/pull/21098
Full Changelog: https://github.com/xamarin/xamarin-macios/compare/dotnet-8.0.1xx-xcode16.0-8314...dotnet-9.0.1xx-xcode16.0-9617
We support a few TargetPlatformVersion
values (the optional OS version at the
end of the TargetFramework - for instance for net9.0-ios18.0
the
TargetPlatformVersion
would be 18.0
), but in the past we've ignored any
unsupported values, and just fallen back to the latest supported version.
In .NET 9 using an unsupported TargetPlatformVersion
will become an error
instead. While the error message will list the valid versions, typically it's
best to not put a version at all, and then we'll automatically pick the latest
(and it won't be necessary to update in the future).
File issues here: https://github.com/xamarin/xamarin-macios/issues/new.
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status