Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WilliamXieMSFT opened this issue Jun 1, 2023 · 0 comments
Open

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

WilliamXieMSFT opened this issue Jun 1, 2023 · 0 comments

Comments

@WilliamXieMSFT
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant