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

Workaround/fix for libgit2sharp custom marshal type cast failure #216

Merged
merged 2 commits into from
Aug 25, 2018

Conversation

AArnott
Copy link
Collaborator

@AArnott AArnott commented Aug 25, 2018

It seems that although we were always consistently loading libgit2sharp in our own load context (as we do with all assemblies we can find in our directory), the CLR fails in its p/invoke custom marshaler unless we've loaded it in the default load context -- as if someone else loaded it in the Default context and somehow we were using one context to create the FilePath object and the other to cast it to FilePath. That doesn't seem to be the case here, but at least loading it in the default context works around what may be a bug (https://github.com/dotnet/coreclr/issues/19654).

Fixes #215

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

Successfully merging this pull request may close these issues.

1 participant