Custom marshaling fail on .NET Core makes libgit2sharp 0.25.2 fail
See original GitHub issueWhen upgrading nerdbank.gitversioning from my private libgit2sharp build of 0.24.7-g9fca61fdda to the official 0.25.2, which by the way added custom marshalers back into the codebase that I had originally removed for .NET Core 1.x support, we’re seeing frequent failures because .NET Core claims that the FilePath
type isn’t seem as itself in the custom marshaler method.
My recommendation for a workaround is to switch back to my original .NET Core supporting solution for this project, which avoids custom marshalers altogether.
Other issues tracking the failure:
https://github.com/dotnet/coreclr/issues/19654 https://github.com/AArnott/Nerdbank.GitVersioning/issues/215
Version of LibGit2Sharp (release number or SHA1)
v0.25.2
Operating system(s) tested; .NET runtime tested
Windows, Ubuntu 18 .NET Framework and .NET Core
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
P/Invoke custom marshaler sometimes fails type cast #10965
I'm trying to track down why my upgrade of libgit2sharp to 0.25.2 led to nerdbank.gitversioning to fail (reliably) on a seemingly random set...
Read more >The type initializer for 'LibGit2Sharp.Core.NativeMethods' ...
The failing one has a “packages.config”, while the working one does not. Working project has NO reference to NativeMethods in the csproj file, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think you’re talking about the changes that occurred in this nontrivial pull request? You can imagine that I’m not exactly jumping up and down at the thought of reverting this.
I’d like to hear what the .NET team has to say about this and possible workarounds before we start thinking about adding 500 lines of code back to the project that we removed nine months ago.
Well, that and AArnott/Nerdbank.GitVersioning#217. The original fix for AArnott/Nerdbank.GitVersioning#215 was ineffective.