|
| 1 | +--- |
| 2 | +title: Publish .NET apps for macOS |
| 3 | +description: Learn how to publish .NET applications for macOS, including signing, notarization, and app entitlements. |
| 4 | +author: agocke |
| 5 | +ms.author: angocke |
| 6 | +ms.date: 10/22/2025 |
| 7 | +ms.topic: how-to |
| 8 | +ai-usage: ai-assisted |
| 9 | +--- |
| 10 | + |
| 11 | +# Publish .NET apps for macOS |
| 12 | + |
| 13 | +Publishing .NET applications for macOS requires several additional steps compared to other platforms, due to Apple's security requirements. |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +Before you publish your .NET application for macOS, ensure you have the following: |
| 18 | + |
| 19 | +- **Apple Developer Account**: Needed for code signing and notarization. |
| 20 | +- **Xcode Command Line Tools**: Provides `codesign`, `altool`, and other utilities. |
| 21 | +- **.NET SDK**: Ensure you have the latest .NET SDK installed. |
| 22 | + |
| 23 | +## Produce your app using .NET SDK |
| 24 | + |
| 25 | +Use one of the methods described in the [.NET application publishing overview](/dotnet/core/deploying/) to produce an application. You can create either a framework-dependent or self-contained application. |
| 26 | + |
| 27 | +## Sign and notarize your app |
| 28 | + |
| 29 | +Use [Apple's developer documentation](https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution) to sign and notarize the app native binaries. .NET creates a native *apphost* executable as the entry point for your app. This apphost must be signed and, if your app uses special capabilities, it must be assigned the appropriate **entitlements**. |
| 30 | + |
| 31 | +### Entitlements for apps not published as Native AOT |
| 32 | + |
| 33 | +For apps not published as [Native AOT](native-aot/index.md), the `com.apple.security.cs.allow-jit` entitlement is required. |
| 34 | + |
| 35 | +### Entitlements for apps published as Native AOT |
| 36 | + |
| 37 | +For apps published as [Native AOT](native-aot/index.md), no entitlements are required. |
| 38 | + |
| 39 | +### Optional entitlements for debugging and diagnostics |
| 40 | + |
| 41 | +The following entitlements enable additional debugging and diagnostic capabilities: |
| 42 | + |
| 43 | +- **`com.apple.security.get-task-allow`**: Needed for dump collection with `createdump` and `dotnet dump`. |
| 44 | +- **`com.apple.security.cs.debugger`**: Needed to attach a debugger to the process. |
| 45 | + |
| 46 | +> [!WARNING] |
| 47 | +> Failing to sign and notarize your app might result in the application crashing while executing a restricted operation. |
0 commit comments