Skip to content

Extensions.Base can't support System.Func`10+ #559

@willxie-eng

Description

@willxie-eng

Related PRs:
#463
#557

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions