Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/core/tools/sdk-errors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,4 @@
|[NETSDK1238](netsdk1238.md)|The current .NET SDK ({0}) has known vulnerabilities ({1}).{2} See <https://dotnet.microsoft.com/download>|
|[NETSDK1239](netsdk1239.md)|The current .NET SDK ({0}) is end of life as of {1}. It will receive no further security updates: <https://dotnet.microsoft.com/download>|
|[NETSDK1240](netsdk1240.md)|The current .NET SDK ({0}) has no newer release in its feature band. Update to version {1}: <https://dotnet.microsoft.com/download>|
|[NETSDK1242](netsdk1242.md)|Building {0} projects with the Mono runtime is not supported in .NET 11.0 and later. Use the .NET 10.0 SDK to build this project.|

Check failure on line 385 in docs/core/tools/sdk-errors/index.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

docs/core/tools/sdk-errors/index.md:385:159 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md047.md
43 changes: 43 additions & 0 deletions docs/core/tools/sdk-errors/netsdk1242.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "NETSDK1242: Building projects with the Mono runtime is not supported in .NET 11 and later"
description: Learn how to resolve build error NETSDK1242, which reports that the Mono runtime is not supported for the target mobile platform in .NET 11 and later.
ms.topic: error-reference
ms.date: 06/15/2026
ai-usage: ai-assisted
f1_keywords:
- NETSDK1242
---
# NETSDK1242: Building projects with the Mono runtime is not supported in .NET 11 and later

This error indicates that the project selects the Mono runtime (the `UseMonoRuntime` property is set to `true`) for a mobile target platform while targeting .NET 11 or later, where the Mono runtime is no longer supported for that platform. The full error message is similar to the following example:

> NETSDK1242: Building ios projects with the Mono runtime is not supported in .NET 11.0 and later. Use the .NET 10.0 SDK to build this project.

The error applies to the `android`, `ios`, `maccatalyst`, and `tvos` target platforms.

## Resolve the error

Choose one of the following options:

- Build the project with the .NET 11 SDK or later without selecting the Mono runtime. Remove the `UseMonoRuntime` property from the project, or set it to `false`:

```xml
<PropertyGroup>
<UseMonoRuntime>false</UseMonoRuntime>
</PropertyGroup>
```

- If the project requires the Mono runtime, build it with the .NET 10 SDK. Add a `global.json` file at the root of the project to select that SDK version:

```json
{
"sdk": {
"version": "10.0.100"
}
}
```

## See also

- [global.json overview](../global-json.md)
- [.NET SDK error and warning reference](index.md)

Check failure on line 43 in docs/core/tools/sdk-errors/netsdk1242.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

docs/core/tools/sdk-errors/netsdk1242.md:43:50 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md047.md
4 changes: 3 additions & 1 deletion docs/navigate/tools-diagnostics/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ items:
href: ../../core/tools/sdk-errors/netsdk1239.md
- name: NETSDK1240
href: ../../core/tools/sdk-errors/netsdk1240.md
- name: NETSDK1242
href: ../../core/tools/sdk-errors/netsdk1242.md
- name: BuildCheck rules
items:
- name: Index of rules
Expand Down Expand Up @@ -4241,4 +4243,4 @@ items:
- name: Compatible framework validator
href: ../../fundamentals/apicompat/package-validation/compatible-framework-validator.md
- name: Microsoft.DotNet.ApiCompat.Tool global tool
href: ../../fundamentals/apicompat/global-tool.md
href: ../../fundamentals/apicompat/global-tool.md
Loading