Clarify assembly-qualified names for native hosting - #55315
Draft
elinor-fung with Copilot wants to merge 3 commits into
Draft
Clarify assembly-qualified names for native hosting#55315elinor-fung with Copilot wants to merge 3 commits into
elinor-fung with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR clarifies the native hosting tutorial’s requirements around using assembly-qualified names when calling load_assembly_and_get_function_pointer, and adjusts the inline C++ snippet so the inputs (assembly path, type name, and method name) are shown together.
Changes:
- Update tutorial text to explicitly require an assembly-qualified managed type name.
- Update tutorial text to require an assembly-qualified delegate type name when you specify a custom delegate signature.
- Expand the
LoadAndGetsnippet region to include the managed assembly path, the assembly-qualified type name, and the target method name.
Show a summary per file
| File | Description |
|---|---|
| samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/nativehost.cpp | Expands the LoadAndGet snippet region so the documented snippet shows the assembly path, assembly-qualified type name, and method name together. |
| docs/core/tutorials/netcore-hosting.md | Clarifies that the type name (and custom delegate type name) must be assembly-qualified when loading a managed assembly and retrieving a function pointer. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
Copilot created this pull request from a session on behalf of
elinor-fung
August 5, 2026 17:43
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clarify the native hosting tutorial’s requirements for assembly-qualified names when you load a managed assembly and obtain a function pointer.
Fixes dotnet/runtime#76080
Changes
LoadAndGetinline C++ snippet to show the managed assembly path, the assembly-qualified type name (DotNetLib.Lib, DotNetLib), and the target method name together.Validation
dotnet build samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/NativeHost.csprojnpx --yes markdownlint-cli2 docs/core/tutorials/netcore-hosting.mdInternal previews