Skip to content

Commit 280f8d7

Browse files
authored
Add clarification that hosting APIs require framework-dependent deployments (#49595)
1 parent 90e749f commit 280f8d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/core/tutorials/netcore-hosting.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ You also need to build a .NET component to test the host with, so you should ins
2424

2525
Hosting the .NET runtime is done with the `nethost` and `hostfxr` libraries' APIs. These entry points handle the complexity of finding and setting up the runtime for initialization and allow both launching a managed application and calling into a static managed method.
2626

27+
> [!IMPORTANT]
28+
> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. Self-contained deployments should be treated as stand-alone executables. If you're evaluating deployment models for your application, use a framework-dependent deployment to ensure compatibility with these native hosting APIs.
29+
2730
## Create a host using `nethost.h` and `hostfxr.h`
2831

2932
A [sample host](https://github.com/dotnet/samples/tree/main/core/hosting) demonstrating the steps outlined in the tutorial below is available in the dotnet/samples GitHub repository. Comments in the sample clearly associate the numbered steps from this tutorial with where they're performed in the sample. For download instructions, see [Samples and Tutorials](../../samples-and-tutorials/index.md#view-and-download-samples).

0 commit comments

Comments
 (0)