Repository navigation
Extract libgit2 at runtime - #3
anaisbetts wants to merge 1 commit into
Conversation
Unfortunately, while Visual Studio has many solutions for ensuring that your managed dependent DLLs get shipped alongside your project, it's got absolutely nothing to ensure your native P/Invoke DLLs get shipped. The easiest, most foolproof method to ensure that a managed DLL has its native dependency regardless of how it is built or shipped is to embed it as a resource and extract it before use. This patch ensures that LibGit2Sharp will always have the corresponding version of git2.dll.
Hm. I've made some research. Considering the "by default" configuration of medium trust hosted environment and Azure, extracting (either in the app/bin dir or in the temp directory) would make us jump through many hoops.
Sorry about this. You're right.... and inspiring! So, if we strike off the extraction, we go back to SqlCe scenario: Next to the managed assembly, a folder However, instead on relying on The added path would be a combination of the original location of LibGit2Sharp ( Do you think this would work on your machine? |
They can always deploy libgit2.dll themselves. There's no reason for us to bend over backwards to support a scenario that is marginal at best.
Paul Betts paul@paulbetts.org On Monday, October 3, 2011 at 1:11 PM, nulltoken wrote:
|

Unfortunately, while Visual Studio has many solutions for ensuring that
your managed dependent DLLs get shipped alongside your project, it's got
absolutely nothing to ensure your native P/Invoke DLLs get shipped.
The easiest, most foolproof method to ensure that a managed DLL has its
native dependency regardless of how it is built or shipped is to embed
it as a resource and extract it before use. This patch ensures that
LibGit2Sharp will always have the corresponding version of git2.dll.