By default, non-notarized versions of the .NET Core SDK 3.0 and above produce a native Mach-O executable (known as the appHost) when your project compiles, publishes, or is run.
dotnet runcommand, or by starting the Mach-O executable directly.
dotnet <filename.dll> command.
You can turn on appHost generation with the UseAppHost boolean setting in the project file as shown below.
<PropertyGroup> <UseAppHost>true</UseAppHost> </PropertyGroup>
You can also toggle the appHost with the
-p:UseAppHost parameter on the command line for the specific dotnet command you run as shown below.
dotnet run -p:UseAppHost=true
An appHost is always created when you publish your app self-contained.
When the appHost is enabled in your project, and you use the
dotnet run command to run your app, the app is invoked in the context of the appHost and not the default host.
dotnet runcommand runs your app in the context of the default host.
dotnet <filename.dll>invokes the app with the default host, the shared runtime.
When an app using the appHost is invoked, the certificate partition accessed by the app is different from the notarized default host. If your app must access the certificates installed through the default host, use the
dotnet run command to run your app from its project file, or use the
dotnet <filename.dll> command to start the app directly.