diff --git a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs index daa7451ae..762037637 100644 --- a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs +++ b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs @@ -64,9 +64,8 @@ private static void SetUpTestEnvironment() if (resourcesPath == null) { string initialAssemblyParentFolder = Directory.GetParent(new Uri(typeof(BaseFixture).GetTypeInfo().Assembly.CodeBase).LocalPath).FullName; - const string sourceRelativePath = @"../../../../LibGit2Sharp.Tests/Resources"; - - resourcesPath = Path.Combine(initialAssemblyParentFolder, sourceRelativePath); + int pos = initialAssemblyParentFolder.IndexOf("LibGit2Sharp.Tests"); + resourcesPath = Path.Combine(initialAssemblyParentFolder.Substring(0, pos), "../LibGit2Sharp.Tests/Resources"); } ResourcesDirectory = new DirectoryInfo(resourcesPath);