Description
During OnModuleLoad for mscorlib.dll, HostExtensionsBase tries to inject the types/methods from Microsoft.Diagnostics.Instrumentation.Extensions.Base.dll into mscorlib.
The Extensions.Base.dll module contains the ApplicationInsights_OnBegin/_OnEnd
callbacks that use System.Func and other types.
It also defines these callbacks inside the _System.Diagnostics
namespace - types with _
prefixes are emitted into mscorlib (otherwise they are assumed to be there already.
The import will fail when resolving types like System.Func`10 since that comes from System.Core.dll which requires a TypeRef - not allowed in mscorlib.
One solution might be to have the System.Func`10+ callbacks defined separately and imported into System.Core.dll, but there might also be changes needed in Intercept-Engine to consume that.