dotnet/diagnostics

Simplify SOS' discovery/hosting of CoreCLR by using nethost + hostfxr

jkoritzinsky opened this issue · 0 comments

Background and Motivation

Today, SOS manually directly calls the CoreCLR hosting APIs on coreclr.dll/libcoreclr.so. This requires is to do a significant amount of work to locate CoreCLR and construct valid hosting parameters. This also means it does not benefit from any improvements in the hosting layer (of which there have been a few in recent years).

Proposed Feature

Rewrite hostcoreclr.cpp to use nethost (or libnethost) to discover and load the .NET runtime for the managed components of SOS.

Usage Examples