-
Couldn't load subscription status.
- Fork 5.2k
Description
To support C++/CLI libraries in .NET Core, ijwhost was created as a shim for finding and loading the runtime. All C++/CLI libraries are linked to this shim, such that ijwhost.dll is found/loaded when the C++/CLI library is loaded.
By default, Windows' DLL search will look for dependencies of a DLL as if they were loaded with just the module name. This means that, depending on how a host application loads the C++/CLI library, the C++/CLI library may fail to load due to ijwhost.dll not being found. In order for the load to work one of the following needs to be true:
ijwhost.dllis on the search path- the host applications specifies either
LOAD_WITH_ALTERED_SEARCH_PATHorLOAD_LIBRARY_SEARCH_DLL_LOAD_DIRflags forLoadLibrarysuch that dependencies are searched for in the same directory as the C++/CLI library
C++/CLI libraries cannot dictate how their hosts load them and authors should not need to be concerned with how the ijwhost shim is found and loaded. The runtime/tooling should make the usage of ijwhost hidden to the user such that it just works without user intervention.
In .NET Framework, the equivalent shim (mscoree/mscoreei) is system-wide, so this was not an issue.
Potential options:
- Make
ijwhosta static library that gets linked into the C++/CLI library - ?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status