From c3a60c9ee4b0f517426e355b9811eeb1421f2149 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 20:00:04 +0000 Subject: [PATCH 1/5] Initial plan From c76e2703837df60281a31b7af613f08e7229888d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 20:05:00 +0000 Subject: [PATCH 2/5] Add clarification about hosting API limitations with single-file deployments Co-authored-by: agocke <515774+agocke@users.noreply.github.com> --- docs/core/tutorials/netcore-hosting.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/core/tutorials/netcore-hosting.md b/docs/core/tutorials/netcore-hosting.md index 9c7272d6d6d0c..d0d195511f91b 100644 --- a/docs/core/tutorials/netcore-hosting.md +++ b/docs/core/tutorials/netcore-hosting.md @@ -24,6 +24,9 @@ You also need to build a .NET component to test the host with, so you should ins 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. +> [!IMPORTANT] +> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. These APIs don't work with single-file deployments because the required runtime files must be available separately on the target system. If you're evaluating deployment models for your application, use a framework-dependent deployment to ensure compatibility with these native hosting APIs. + ## Create a host using `nethost.h` and `hostfxr.h` 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). From 9c857e6d1b45fef3b8f4a7b6e04bbacb3e7e50ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:55:45 +0000 Subject: [PATCH 3/5] Update hosting API note per review feedback Co-authored-by: agocke <515774+agocke@users.noreply.github.com> --- docs/core/tutorials/netcore-hosting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/tutorials/netcore-hosting.md b/docs/core/tutorials/netcore-hosting.md index d0d195511f91b..52c0f5079f980 100644 --- a/docs/core/tutorials/netcore-hosting.md +++ b/docs/core/tutorials/netcore-hosting.md @@ -25,7 +25,7 @@ You also need to build a .NET component to test the host with, so you should ins 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. > [!IMPORTANT] -> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. These APIs don't work with single-file deployments because the required runtime files must be available separately on the target system. If you're evaluating deployment models for your application, use a framework-dependent deployment to ensure compatibility with these native hosting APIs. +> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. Self-contained deployments are only supported with the built-in hosts. If you're evaluating deployment models for your application, use a framework-dependent deployment to ensure compatibility with these native hosting APIs. ## Create a host using `nethost.h` and `hostfxr.h` From 66fcb9552d6bbfa2fed484db46f50daad87b937a Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Tue, 4 Nov 2025 13:13:23 -0800 Subject: [PATCH 4/5] Update hosting API deployment model explanation Clarify deployment model information for nethost and hostfxr APIs. --- docs/core/tutorials/netcore-hosting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/tutorials/netcore-hosting.md b/docs/core/tutorials/netcore-hosting.md index 52c0f5079f980..7fed53888b768 100644 --- a/docs/core/tutorials/netcore-hosting.md +++ b/docs/core/tutorials/netcore-hosting.md @@ -25,7 +25,7 @@ You also need to build a .NET component to test the host with, so you should ins 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. > [!IMPORTANT] -> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. Self-contained deployments are only supported with the built-in hosts. If you're evaluating deployment models for your application, use a framework-dependent deployment to ensure compatibility with these native hosting APIs. +> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. Self-contained deployments shuold 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. ## Create a host using `nethost.h` and `hostfxr.h` From 13bd5452d04926104539d6ebbc7a1e1903b2984f Mon Sep 17 00:00:00 2001 From: Aaron R Robinson Date: Tue, 4 Nov 2025 14:34:43 -0800 Subject: [PATCH 5/5] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/core/tutorials/netcore-hosting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/tutorials/netcore-hosting.md b/docs/core/tutorials/netcore-hosting.md index 7fed53888b768..4b56b3d22bbd7 100644 --- a/docs/core/tutorials/netcore-hosting.md +++ b/docs/core/tutorials/netcore-hosting.md @@ -25,7 +25,7 @@ You also need to build a .NET component to test the host with, so you should ins 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. > [!IMPORTANT] -> The `nethost` and `hostfxr` hosting APIs only support framework-dependent deployments. Self-contained deployments shuold 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. +> 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. ## Create a host using `nethost.h` and `hostfxr.h`