Skip to content

Commit 41cc995

Browse files
committed
minor
1 parent cec2c03 commit 41cc995

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/GitVersionTask.MsBuild/LibGit2Sharp/GitLoaderContext.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Reflection;
77
using System.Runtime.InteropServices;
88
using System.Runtime.Loader;
9-
using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment;
109

1110
namespace GitVersion.MSBuildTask.LibGit2Sharp
1211
{
@@ -60,7 +59,7 @@ protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
6059
private static string GetNativeLibraryDirectory()
6160
{
6261
var dir = Path.GetDirectoryName(typeof(GitLoaderContext).Assembly.Location);
63-
return Path.Combine(dir, "runtimes", RuntimeIdMap.GetNativeLibraryDirectoryName(RuntimeEnvironment.GetRuntimeIdentifier()), "native");
62+
return Path.Combine(dir, "runtimes", RuntimeIdMap.GetNativeLibraryDirectoryName(), "native");
6463
}
6564

6665
private static string GetNativeLibraryExtension()

src/GitVersionTask.MsBuild/LibGit2Sharp/RuntimeIdMap.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ internal static class RuntimeIdMap
1212
// https://github.com/dotnet/core-setup/issues/1846
1313
// https://github.com/NuGet/Home/issues/5862
1414

15-
public static string GetNativeLibraryDirectoryName(string runtimeIdentifier)
15+
public static string GetNativeLibraryDirectoryName()
1616
{
17+
var runtimeIdentifier = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier();
1718
#if DEBUG
1819
Debug.Assert(SDirectories.Length == SRids.Length);
1920

0 commit comments

Comments
 (0)