Skip to content

.NET 8 release notes

Rolf Bjarne Kvinge edited this page Jun 28, 2023 · 19 revisions

Warning This document is still work-in-progress/incomplete.

We're excited to announce our .NET 8 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

Versions

This release consists of the following versions:

  • iOS: ...
  • tvOS: ...
  • macOS: ...
  • Mac Catalyst: ...

Requirements

It's highly recommended to use Xcode 15.0+ (which requires macOS 13.? (Ventura)). 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: 11.0
  • macOS: 10.15
  • tvOS: 11.0
  • Mac Catalyst: 13.1

Note: while we support macOS 10.15, we're only testing on OS versions that Apple supports. At the time of this writing this means we're only testing on macOS 12.0+.

Getting started

In contrast to how Xamarin.iOS and Xamarin.Mac were shipped (as installable *.pkg files), our .NET SDKs are shipped as workloads in the .NET world. This means that the first step is to getting started is to install .NET 8.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

What's New in this Release

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 15.0:

  • iOS ?
  • macOS ?
  • tvOS ?
  • Mac Catalyst ?

What's Changed

Default RuntimeIdentifier(s)

The default runtime identifier(s) has changed to:

  • Simulator (iOS, tvOS): if the Mac's an ARM64 machine, then iossimulator-arm64/tvossimulator-arm64. Otherwise iossimulator-x64/tvossimulator-x64.
  • Device (iOS, tvOS): no change (there's only one runtime identifier for device anyways, ios-arm64/tvos-arm64).
  • Desktop: if building for Debug, and the Mac's an ARM64 machine, then osx-arm64/maccatalyst-arm64. If building for Debug, and the Mac's an x86_64 machine, then osx-x64/maccatalyst-x64. If building for Release, the default stays the same as in .NET 7 (a universal build, osx-x64;osx-arm64 and maccatalyst-x64;maccatalyst-arm64).

The default can be overridden using the RuntimeIdentifer property (when targeting a single runtime identifier) or the RuntimeIdentifiers property (when creating a universal build consisting of multiple runtime identifiers):

<PropertyGroup>
    <RuntimeIdentifiers>iossimulator-x64;iossimulator-arm64</RuntimeIdentifiers>
</PropertyGroup>

Overriding the default might be necessary sometimes, in particular for projects that use third-party native bindings that don't contain an arm64 slice for the simulator.

Known NuGets that don't contain the arm64 slice for the simulator:

Known NuGets that have recently added the arm64 slice for the simulator:

There are two caveats:

  • When building remotely from the command line on Windows, the architecture detection will use the architecture of the Windows machine (because the RuntimeIdentifier has to be set early in the build process, before the build can connect to the Mac to figure out its architecture).
  • When building remotely using Visual Studio on Windows, the IDE will detect the architecture of the remote Mac and set it accordingly. However, overriding the default like above won't work; instead the IDE will provide an option to not auto-detect/hardcode a specific runtime identifier (this has not been implemented in the IDE as of this writing, and as such the exact details are not known).

Ref: https://github.com/xamarin/xamarin-macios/pull/18495

Managed Static Registrar

New Contributors

Full changelog

Breaking Changes

Known Issues

Can't run mobile app from the command line on Windows

It's currently not possible to run a mobile app (iOS, tvOS) on Windows using the command line. Please use an IDE to launch apps from Windows.

Ref: https://github.com/xamarin/xamarin-macios/issues/16609

FAQ

How to run on Device/Simulator from the command line

The general process is documented here:

https://docs.microsoft.com/en-us/dotnet/maui/ios/cli

but does not include running on an attached device.

To do that, include -p:RuntimeIdentifier=ios-arm64, along with the other parameters.

dotnet build -t:Run -f:net7.0-ios -p:RuntimeIdentifier=ios-arm64 -p:_DeviceName=MY_SPECIFIC_UUID

with MY_SPECIFIC_UUID found as described here but for your device.

Note that this does not work from Windows, only from a Mac.

Feedback

File issues here: https://github.com/xamarin/xamarin-macios/issues/new.

Clone this wiki locally