Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5bfaca5

Browse files
committed
Fix Assembly.CodeBase warning
1 parent 168b62f commit 5bfaca5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.Reflection;
88
using System.Text;
99
using System.Text.RegularExpressions;
10-
using LibGit2Sharp.Core;
1110
using Xunit;
1211

1312
namespace LibGit2Sharp.Tests.TestHelpers
@@ -65,7 +64,11 @@ private static void SetUpTestEnvironment()
6564

6665
if (resourcesPath == null)
6766
{
67+
#if NETFRAMEWORK
6868
resourcesPath = Path.Combine(Directory.GetParent(new Uri(typeof(BaseFixture).GetTypeInfo().Assembly.CodeBase).LocalPath).FullName, "Resources");
69+
#else
70+
resourcesPath = Path.Combine(Directory.GetParent(typeof(BaseFixture).GetTypeInfo().Assembly.Location).FullName, "Resources");
71+
#endif
6972
}
7073

7174
ResourcesDirectory = new DirectoryInfo(resourcesPath);

0 commit comments

Comments
 (0)