Skip to content

Commit a318a91

Browse files
committed
Target netstandard2.0 rather than net472
Targeting netstandard2.0 will make LibGit2Sharp more versatile.
1 parent 5085a0c commit a318a91

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

LibGit2Sharp/Core/NativeMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private static string GetGlobalSettingsNativeLibraryPath()
6666
return Path.Combine(nativeLibraryDir, libgit2 + Platform.GetNativeLibraryExtension());
6767
}
6868

69-
#if NETFRAMEWORK
69+
#if NETSTANDARD
7070
private static bool TryUseNativeLibrary() => false;
7171
#else
7272
private static bool TryUseNativeLibrary()

LibGit2Sharp/GlobalSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static GlobalSettings()
2929

3030
nativeLibraryPathAllowed = netFX || netCore;
3131

32-
#if NETFRAMEWORK
32+
#if NETSTANDARD
3333
if (netFX)
3434
{
3535
// For .NET Framework apps the dependencies are deployed to lib/win32/{architecture} directory
@@ -40,7 +40,7 @@ static GlobalSettings()
4040
registeredFilters = new Dictionary<Filter, FilterRegistration>();
4141
}
4242

43-
#if NETFRAMEWORK
43+
#if NETSTANDARD
4444
private static string GetExecutingAssemblyDirectory()
4545
{
4646
// Assembly.CodeBase is not actually a correctly formatted

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
55
<LangVersion>10.0</LangVersion>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .NET</Description>

0 commit comments

Comments
 (0)