Skip to content

Question about coreclr, hostfxr and nethost in net 8 or 9 #110885

Answered by huoyaoyuan
DeafMan1983 asked this question in Q&A
Discussion options

You must be logged in to vote

To summarize:

Your host and entry application is native and developed in C. The CLR instance is hosted by the C application. The bridge should be established via either nethost.h, or nativeaot.

The error message "Failed to initialize coreclr!" sounds like there's another CLR instance already running in the process, used by any service. CLR doesn't support co-existence within the same process. In this case, using nativeaot should be the only option.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@DeafMan1983
Comment options

@huoyaoyuan
Comment options

Answer selected by DeafMan1983
Comment options

You must be logged in to vote
1 reply
@DeafMan1983
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants