c# - Libgit2sharp can't find git2-*.dll when built in Xamarin studio on Windows -


i'm attempting build c# desktop application on windows xamarin studio. after importing libgit2sharp package (and consequently libgit2sharp.nativebinaries package), attempt use library results in 1 of these:

exception in gtk# callback delegate   note: applications can use glib.exceptionmanager.unhandledexception handle exception. system.reflection.targetinvocationexception: exception has been thrown target of invocation. ---> system.dllnotfoundexception: git2-785d8c4   @ (wrapper managed-to-native) libgit2sharp.core.nativemethods:git_config_find_xdg (libgit2sharp.core.handles.gitbuf)   @ libgit2sharp.core.proxy.convertpath (system.func`2 pathretriever) [0x00006] in <filename unknown>:0    @ libgit2sharp.core.proxy.git_config_find_xdg () [0x00000] in <filename unknown>:0    @ libgit2sharp.configuration..ctor (libgit2sharp.repository repository, system.string repositoryconfigurationfilelocation, system.string globalconfigurationfilelocation, system.string xdgconfigurationfilelocation, system.string systemconfigurationfilelocation) [0x00032] in <filename unknown>:0    @ libgit2sharp.configuration.buildfrom (system.string repositoryconfigurationfilelocation, system.string globalconfigurationfilelocation, system.string xdgconfigurationfilelocation, system.string systemconfigurationfilelocation) [0x00000] in <filename unknown>:0    @ libgit2sharp.configuration.buildfrom (system.string repositoryconfigurationfilelocation, system.string globalconfigurationfilelocation) [0x00000] in <filename unknown>:0    @ bravura.tools.git.helper.operations.coresettings.run () [0x00015] in c:\code\bravura\git-helper\operations\coresettings.cs:37    @ bravura.tools.git.helper.operations.coremenu.onbuttonokreleased (system.object sender, system.eventargs e) [0x00020] in c:\code\bravura\git-helper\operations\coremenu.cs:43    @ (wrapper managed-to-native) system.reflection.monomethod:internalinvoke (system.reflection.monomethod,object,object[],system.exception&)   @ system.reflection.monomethod.invoke (system.object obj, bindingflags invokeattr, system.reflection.binder binder, system.object[] parameters, system.globalization.cultureinfo culture) [0x00038] in c:\j\workspace\v\repos\mono\mcs\class\corlib\system.reflection\monomethod.cs:295 

i've found manually putting dll , pdb in root output directory sorts out issue, doesn't make build process. really, there should way add "nativebinaries*" directory load path. i've attempted load library manually, since it's not .net, option doesn't work.

am missing obvious? common issue i'm blundering around on?

i've checked following issues no avail:

after looking around bit, , helpful point in right direction matt ward, found working answer while reading loading dlls path specified in setdlldirectory in c#, or more specifically, this comment.

string newpath = environment.getenvironmentvariable("path") +     ";" + environment.currentdirectory + "\\nativebinaries\\x86\\"; environment.setenvironmentvariable("path", newpath); 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -