Should nethost be migrtated from coreclr to nethost and hostfxr libraries? #88388
-
I currently have a coreclr host and that interops with NET6.0.18 without any issue. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
c.c. @vitek-karas |
Beta Was this translation helpful? Give feedback.
-
We consider the There are also functional reasons for this - for example So in short I would suggest you strongly consider moving your code to the |
Beta Was this translation helpful? Give feedback.
We consider the
coreclr.dll
to be an internal implementation detail. We do know that it's used by some hosts, but we actively discourage people from doing that. And we may decide to break it in the future - for example #52688 could break your host (depends on how you're using coreclr) if we decide to do it.There are also functional reasons for this - for example
AssemblyDependencyResolver
will not work if the runtime is hosted withouthostfxr
/hostpolicy
.So in short I would suggest you strongly consider moving your code to the
hostfxr
APIs. It should also simplify your code as hosting the runtime directly usually needs more setup code.