You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/prompts/error-consolidation.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ Overall steps:
8
8
1. Run Copilot search for other existing errors that person may have missed.
9
9
1. Search for missing errors.
10
10
11
-
## Add a single existing file into the new consolidated article.
11
+
## Add a single existing file into the new consolidated article.
12
12
13
-
We're going to work through a series of files consolidating errors and warnings related to declaring overloaded operators.
13
+
We're going to work through a series of files consolidating errors and warnings related to declaring the `dynamic` type and dynamic binding.
14
14
15
-
The destination for all these edits is the overloaded-operator-errors.md file. It already contains a skeleton for the final output.
15
+
The destination for all these edits is the dynamic-type-and-binding-errors.md file. It already contains a skeleton for the final output.
16
16
17
17
For each source file I specify in this chat, you'll do the following tasks:
18
18
@@ -28,7 +28,7 @@ For each source file I specify in this chat, you'll do the following tasks:
28
28
29
29
## Search for other related articles that may be missed.
30
30
31
-
Search all files in the docs/csharp/language-reference/compiler-messages and the docs/csharp/misc folder for any other errors and warnings that involve operator overloading. Give me a list to review for possible additional consolidation. Don't make any edits until the originating user approves.
31
+
Search all files in the docs/csharp/language-reference/compiler-messages and the docs/csharp/misc folder for any other errors and warnings that involve the `dynamic` type or dynamic binding. Give me a list to review for possible additional consolidation. Don't make any edits until the originating user approves.
32
32
33
33
## Final search in roslyn source
34
34
@@ -51,7 +51,7 @@ Note that no redirections need to be added for these error codes.
51
51
52
52
## Build consolidated sections
53
53
54
-
For all remaining work, all edits will be in the `overloaded-operator-errors.md` file. The final format should mirror the structure of the `preprocessor-errors.md` file. Every H2 is a theme, all anchors are for the theme, not an individual error code.
54
+
For all remaining work, all edits will be in the `dynamic-type-and-binding-errors.md` file. The final format should mirror the structure of the `preprocessor-errors.md` file. Every H2 is a theme, all anchors are for the theme, not an individual error code.
55
55
56
56
To do that, make a new H2 section for the theme. Remove all the H2s for the individual error codes that are part of that theme. Where applicable, the new H2 can include text or examples from the H2s you remove. The new section should include links to language reference articles that discuss the feature or theme.
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.
- Open a terminal and navigate to a folder where you'll store and test the templates.
39
38
40
39
## Create the required folders
41
40
@@ -54,7 +53,7 @@ parent_folder
54
53
55
54
## Create an item template
56
55
57
-
An item template is a specific type of template that contains one or more files. These types of templates are useful when you already have a project and you want to generate another file, like a config file or code file. In this example, you'll create a class that adds an extension method to the string type.
56
+
An item template is a specific type of template that contains one or more files. These types of templates are useful when you already have a project and you want to generate another file, like a config file or code file. In this example, you create a class that adds an extension method to the string type.
58
57
59
58
In your terminal, navigate to the _working\content_ folder and create a new subfolder named _extensions_.
60
59
@@ -64,7 +63,7 @@ working
64
63
└───extensions
65
64
```
66
65
67
-
Navigate to the _extensions_ folder and create a new file named _StringExtensions.cs_. Open the file in a text editor. This class will provide an extension method named `Reverse` that reverses the contents of a string. Paste in the following code and save the file:
66
+
Navigate to the _extensions_ folder and create a new file named _StringExtensions.cs_. Open the file in a text editor. This class provides an extension method named `Reverse` that reverses the contents of a string. Paste in the following code and save the file:
68
67
69
68
```csharp
70
69
namespaceSystem;
@@ -80,7 +79,7 @@ public static class StringExtensions
80
79
}
81
80
```
82
81
83
-
Now that the content of the template is finished, the next step is to create the template config.
82
+
Now that the content of the template is finished, create the template config.
84
83
85
84
## Create the template config
86
85
@@ -171,7 +170,7 @@ Template options:
171
170
Default: StringExtensions
172
171
```
173
172
174
-
Now that you have a valid _.template.config/template.json_ file, your template is ready to be installed. In your terminal, navigate to the _extensions_ folder and run the following command to install the template located at the current folder:
173
+
Now that you have a valid _.template.config/template.json_ file, your template is ready to be installed. In your terminal, navigate to the _extensions_ folder and run the following command to install the template located at the current folder:
175
174
176
175
***On Windows**: `dotnet new install .\`
177
176
***On Linux or macOS**: `dotnet new install ./`
@@ -192,8 +191,9 @@ Example templates: string extensions stringext [C#]
192
191
193
192
Now that you have an item template installed, test it.
194
193
195
-
01. Navigate to the _test_ folder.
196
-
01. Create a new console application with `dotnet new console`, which generates a working project you can easily test with the `dotnet run` command.
194
+
1. Navigate to the _test_ folder.
195
+
196
+
1. Create a new console application with `dotnet new console`, which generates a working project you can easily test with the `dotnet run` command.
197
197
198
198
```dotnetcli
199
199
dotnet new console
@@ -211,7 +211,7 @@ Now that you have an item template installed, test it.
211
211
Restore succeeded.
212
212
```
213
213
214
-
01. Run the project using the following command.
214
+
1. Run the project using the following command.
215
215
216
216
```dotnetcli
217
217
dotnet run
@@ -223,7 +223,7 @@ Now that you have an item template installed, test it.
223
223
Hello, World!
224
224
```
225
225
226
-
01. Run `dotnet new stringext` to generate the _StringExtensions.cs_ file from the template.
226
+
1. Run `dotnet new stringext` to generate the _StringExtensions.cs_ file from the template.
227
227
228
228
```dotnetcli
229
229
dotnet new stringext
@@ -235,7 +235,7 @@ Now that you have an item template installed, test it.
235
235
The template "Example templates: string extensions" was created successfully.
236
236
```
237
237
238
-
01. Change the code in _Program.cs_ to reverse the `"Hello, World!"` string with the extension method provided by the template.
238
+
1. Change the code in _Program.cs_ to reverse the `"Hello, World!"` string with the extension method provided by the template.
239
239
240
240
```csharp
241
241
Console.WriteLine("Hello, World!".Reverse());
@@ -257,7 +257,7 @@ Congratulations! You created and deployed an item template with .NET. In prepara
257
257
258
258
## Uninstall the template
259
259
260
-
In your terminal, navigate to the _extensions_ folder and run the following command to uninstall the templates located at the current folder:
260
+
In your terminal, navigate to the _extensions_ folder and run the following command to uninstall the templates located at the current folder:
261
261
262
262
* **On Windows**: `dotnet new uninstall .\`
263
263
* **On Linux or macOS**: `dotnet new uninstall ./`
Copy file name to clipboardExpand all lines: docs/core/tutorials/cli-templates-create-project-template.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,15 @@
2
2
title: Create a project template for dotnet new
3
3
description: Learn how to create a project template for the dotnet new command.
4
4
author: adegeo
5
-
ms.date: 09/08/2023
5
+
ms.date: 10/23/2025
6
+
ai-usage: ai-assisted
6
7
ms.topic: tutorial
7
8
ms.author: adegeo
8
9
---
9
10
10
11
# Tutorial: Create a project template
11
12
12
-
With .NET, you can create and deploy templates that generate projects, files, even resources. This tutorial is part two of a series that teaches you how to create, install, and uninstall, templates for use with the `dotnet new` command.
13
+
With .NET, you can create and deploy templates that generate projects, files, and resources. This tutorial is part two of a series that teaches you how to create, install, and uninstall templates for use with the `dotnet new` command.
13
14
14
15
> [!TIP]
15
16
> The official .NET templates that are shipped with the .NET SDK can be found in the following repositories:
@@ -26,7 +27,7 @@ With .NET, you can create and deploy templates that generate projects, files, ev
26
27
>
27
28
> You can view the templates that are installed on your machine by running the `dotnet new list` command.
28
29
29
-
In this part of the series you'll learn how to:
30
+
In this part of the series, you learn how to:
30
31
31
32
> [!div class="checklist"]
32
33
>
@@ -38,16 +39,17 @@ In this part of the series you'll learn how to:
38
39
39
40
## Prerequisites
40
41
41
-
* Complete [part 1](cli-templates-create-item-template.md) of this tutorial series.
42
-
* Open a terminal and navigate to the _working\content_ folder.
42
+
-[.NET 9](https://dotnet.microsoft.com/download) or a later version.
- Complete [part 1](cli-templates-create-item-template.md) of this tutorial series.
45
+
46
+
- Open a terminal and navigate to the _working\content_ folder.
45
47
46
48
## Create a project template
47
49
48
50
Project templates produce ready-to-run projects that make it easy for users to start with a working set of code. .NET includes a few project templates such as a console application or a class library. In this example, you create a new console application project that replaces the standard "Hello World" console output with one that runs asynchronously.
49
51
50
-
In your terminal, navigate to the _working\content_ folder and create a new subfolder named _consoleasync_. Enter the subfolder and run `dotnet new console` to generate the standard console application. You'll edit the files produced by this template to create a new template.
52
+
In your terminal, navigate to the _working\content_ folder and create a new subfolder named _consoleasync_. Enter the subfolder and run `dotnet new console` to generate the standard console application. Edit the files produced by this template to create a new template.
51
53
52
54
```console
53
55
working
@@ -59,7 +61,7 @@ working
59
61
60
62
## Modify Program.cs
61
63
62
-
Open up the _Program.cs_ file. The standard console project doesn't asynchronously write to the console output, so let's add that. Change the code to the following and save the file:
64
+
Open up the _Program.cs_ file. The standard console project doesn't asynchronously write to the console output, so add that. Change the code to the following and save the file:
63
65
64
66
```csharp
65
67
// See https://aka.ms/new-console-template for more information
Copy file name to clipboardExpand all lines: docs/core/tutorials/cli-templates-create-template-package.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,19 @@
2
2
title: Create a template package for dotnet new
3
3
description: Learn how to create a csproj file that builds a template package for the dotnet new command.
4
4
author: adegeo
5
-
ms.date: 09/11/2023
5
+
ms.date: 10/23/2025
6
+
ai-usage: ai-assisted
6
7
ms.topic: tutorial
7
8
ms.author: adegeo
8
9
---
9
10
10
11
# Tutorial: Create a template package
11
12
12
-
With .NET, you can create and deploy templates that generate projects, files, and even resources. This tutorial is part three of a series that teaches you how to create, install, and uninstall templates for use with the `dotnet new` command.
13
+
With .NET, you can create and deploy templates that generate projects, files, and resources. This tutorial is part three of a series that teaches you how to create, install, and uninstall templates for use with the `dotnet new` command.
13
14
14
15
You can view the completed template in the [.NET Samples GitHub repository](https://github.com/dotnet/samples/tree/main/core/tutorials/cli-templates-create-item-template).
15
16
16
-
In this part of the series you'll learn how to:
17
+
In this part of the series, you learn how to:
17
18
18
19
> [!div class="checklist"]
19
20
>
@@ -23,16 +24,16 @@ In this part of the series you'll learn how to:
23
24
24
25
## Prerequisites
25
26
26
-
* Complete [part 1](cli-templates-create-item-template.md) and [part 2](cli-templates-create-project-template.md) of this tutorial series.
27
+
-[.NET 9](https://dotnet.microsoft.com/download) or a later version.
27
28
28
-
This tutorial uses the two templates created in the first two parts of this tutorial series. You can use a different template as long as you copy the template, as a folder, into the _working\content_ folder.
29
+
- Complete [part 1](cli-templates-create-item-template.md) and [part 2](cli-templates-create-project-template.md)of this tutorial series.
29
30
30
-
* Open a terminal and navigate to the _working_ folder.
31
+
This tutorial uses the two templates created in the first two parts of this tutorial series. You can use a different template as long as you copy the template, as a folder, into the _working\content_ folder.
31
32
32
-
* Install .NET 8 or .NET 9.
33
-
* Install the `Microsoft.TemplateEngine.Authoring.Templates` template from the NuGet package feed.
33
+
- Open a terminal and navigate to the _working_ folder.
34
34
35
-
* Run the `dotnet new install Microsoft.TemplateEngine.Authoring.Templates` command from your terminal.
35
+
- Install the `Microsoft.TemplateEngine.Authoring.Templates` template from the NuGet package feed.
36
+
- Run the `dotnet new install Microsoft.TemplateEngine.Authoring.Templates` command from your terminal.
36
37
37
38
## Create a template package project
38
39
@@ -42,11 +43,11 @@ Template packages are represented by a NuGet package (_.nupkg_) file. And, like
42
43
43
44
Normally you use a C# project file to compile code and produce a binary. However, the project can also be used to generate a template package. By changing the settings of the _.csproj_, you can prevent it from compiling any code and instead include all the assets of your templates as resources. When this project is built, it produces a template package NuGet package.
44
45
45
-
The package you're going to generate will include the [item](cli-templates-create-item-template.md) and [project](cli-templates-create-project-template.md) templates previously created.
46
+
The package you're going to generate includes the [item](cli-templates-create-item-template.md) and [project](cli-templates-create-project-template.md) templates previously created.
46
47
47
48
The [Microsoft.TemplateEngine.Authoring.Templates](https://www.nuget.org/packages/Microsoft.TemplateEngine.Authoring.Templates) package contains templates useful for template authoring. To install this package, nuget.org should be available as NuGet feed in the working directory.
48
49
49
-
01. In the _working_ folder, run the following command to create the template package:
50
+
1. In the _working_ folder, run the following command to create the template package:
50
51
51
52
```dotnetcli
52
53
dotnet new templatepack -n "AdatumCorporation.Utility.Templates"
0 commit comments