Created
May 24, 2012 14:01
-
-
Save nulltoken/2781727 to your computer and use it in GitHub Desktop.
[LibGit2Sharp] Troubleshooting probing of the native dll on a network path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Reflection; | |
using LibGit2Sharp; | |
namespace ConsoleApplication2 | |
{ | |
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
string originalAssemblypath = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath; | |
string parentPath = Path.GetDirectoryName(originalAssemblypath); | |
string currentArchSubPath = "NativeBinaries/" + ProcessorArchitecture; | |
string path = Path.Combine(parentPath, currentArchSubPath); | |
Console.WriteLine("{0}-{1}", "originalAssemblypath", originalAssemblypath); | |
Console.WriteLine("{0}-{1}", "parentPath", parentPath); | |
Console.WriteLine("{0}-{1}", "currentArchSubPath", currentArchSubPath); | |
Console.WriteLine("{0}-{1}", "path", path); | |
Console.WriteLine(); | |
Console.WriteLine(Repository.Version); | |
Console.ReadLine(); | |
} | |
public static string ProcessorArchitecture | |
{ | |
get | |
{ | |
if (IntPtr.Size == 8) | |
{ | |
return "amd64"; | |
} | |
return "x86"; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment