Fix inject problems (#820)

* CoreCLR: resolve and load nethost on demand instead of requiring it on load

* Remove nethost loading from C# side

* Added option to not chain Process.Dispose; see for last error only if result is empty
This commit is contained in:
kizer 2022-04-25 17:13:32 +09:00 committed by GitHub
parent 5b4833a6f7
commit 9a38a9470c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 57 additions and 94 deletions

View file

@ -26,6 +26,7 @@ void ConsoleTeardown()
std::optional<CoreCLR> g_clr;
int InitializeClrAndGetEntryPoint(
void* calling_module,
std::wstring runtimeconfig_path,
std::wstring module_path,
std::wstring entrypoint_assembly_name,
@ -33,7 +34,7 @@ int InitializeClrAndGetEntryPoint(
std::wstring entrypoint_delegate_type_name,
void** entrypoint_fn)
{
g_clr = CoreCLR();
g_clr.emplace(calling_module);
int result;
SetEnvironmentVariable(L"DOTNET_MULTILEVEL_LOOKUP", L"0");