You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to fix dotnet/Nerdbank.GitVersioning#112 where my MSBuild Core Task needs to load the libgit2 native library and realizing that while .NET Core exposes an event handler to allow aided assembly resolution, it has no equivalent for native modules. And in particular MSBuild does not offer any support for this to Tasks either, so I'm sunk -- unless I perhaps create my own AssemblyLoadContext and use that, but that requires that my MSBuild Task invoke yet another dedicated assembly.
The text was updated successfully, but these errors were encountered:
@AArnott can you add some more detail to your ask? Not sure how AssemblyLoadContext would help with native assemblies? And is this something you're looking at getting from MSBuild or CoreCLR?
AssemblyLoadContext lets me assist the CoreCLR with loading native modules as well. I worked around MSBuild Core's lack of offering this to MSBuild Tasks by hosting my own. And I'm thinking of wrapping this up in a reusable NuGet package as a crutch till #1756 is delivered.
No, I'd really rather CoreCLR never had offered an event on AssemblyLoadContext for loading assemblies so I wouldn't ask that they add another event for native module loading. But MSBuild should have a way to allow tasks to do this. And if this issue is resolved by #1754 such that all Tasks have their own load context and have access to influence that context, then we're good. :)
I'm trying to fix dotnet/Nerdbank.GitVersioning#112 where my MSBuild Core Task needs to load the libgit2 native library and realizing that while .NET Core exposes an event handler to allow aided assembly resolution, it has no equivalent for native modules. And in particular MSBuild does not offer any support for this to Tasks either, so I'm sunk -- unless I perhaps create my own AssemblyLoadContext and use that, but that requires that my MSBuild Task invoke yet another dedicated assembly.
The text was updated successfully, but these errors were encountered: