-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add clarification that hosting APIs require framework-dependent deployments #49595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…oyments Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| > 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. |
@copilot please fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the note to clarify that self-contained deployments are only supported with built-in hosts. Commit: 9c857e6
Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Clarify deployment model information for nethost and hostfxr APIs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an important note to clarify that the nethost and hostfxr hosting APIs only support framework-dependent deployments and don't work with self-contained deployments.
Key Changes
- Added an IMPORTANT callout box explaining hosting API deployment model limitations.
- Provided guidance to use framework-dependent deployments for compatibility with native hosting APIs.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The
nethostandhostfxrhosting APIs don't support self-contained deployments, but this limitation wasn't documented.Changes
The note appears immediately after the introductory paragraph in the "Hosting APIs" section, ensuring readers understand this constraint before implementing a custom host.
This pull request was created as a result of the following prompt from Copilot chat.
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews