Skip to content

Commit 487c083

Browse files
committed
use NETFRAMEWORK constant instead of NET472
1 parent 9181ea0 commit 487c083

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/GitVersionExe.Tests/Helpers/PathHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static string GetCurrentDirectory()
1313

1414
public static string GetExecutable()
1515
{
16-
#if NET472
16+
#if NETFRAMEWORK
1717
var executable = Path.Combine(GetExeDirectory(), "GitVersion.exe");
1818
#else
1919
var executable = "dotnet";
@@ -23,7 +23,7 @@ public static string GetExecutable()
2323

2424
public static string GetExecutableArgs(string args)
2525
{
26-
#if !NET472
26+
#if !NETFRAMEWORK
2727
args = $"{Path.Combine(GetExeDirectory(), "GitVersion.dll")} {args}";
2828
#endif
2929
return args;

src/GitVersionTask.MsBuild/LibGit2Sharp/GitLoaderContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This code originally copied from https://raw.githubusercontent.com/dotnet/sourcelink/master/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs
2-
#if !NET472
2+
#if !NETFRAMEWORK
33
using System;
44
using System.IO;
55
using System.Linq;

src/GitVersionTask.MsBuild/LibGit2Sharp/LibGit2SharpLoader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class LibGit2SharpLoader
1919
private LibGit2SharpLoader(string tasksAssembly)
2020
{
2121
taskDirectory = Path.GetDirectoryName(typeof(LibGit2SharpLoader).Assembly.Location);
22-
#if NET472
22+
#if NETFRAMEWORK
2323
nullVersion = new Version(0, 0, 0, 0);
2424
loaderLog = new List<string>();
2525

@@ -34,7 +34,7 @@ private LibGit2SharpLoader(string tasksAssembly)
3434
#endif
3535
}
3636

37-
#if NET472
37+
#if NETFRAMEWORK
3838

3939
private static Version nullVersion;
4040

src/GitVersionTask.MsBuild/LibGit2Sharp/RuntimeIdMap.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This code originally copied from https://raw.githubusercontent.com/dotnet/sourcelink/master/src/Microsoft.Build.Tasks.Git/RuntimeIdMap.cs
2-
#if !NET472
2+
#if !NETFRAMEWORK
33
using System;
44
using System.Diagnostics;
55

@@ -48,14 +48,14 @@ void FindBestCandidate(int startIndex, int increment)
4848

4949
// Find the highest available version that is lower than or equal to the runtime version
5050
// among candidates that have the same qualifiers.
51-
if (candidateQualifiers == runtimeQualifiers &&
52-
CompareVersions(candidateVersion, runtimeVersion) <= 0 &&
51+
if (candidateQualifiers == runtimeQualifiers &&
52+
CompareVersions(candidateVersion, runtimeVersion) <= 0 &&
5353
(bestVersion == null || CompareVersions(candidateVersion, bestVersion) > 0))
5454
{
5555
bestMatchIndex = i;
5656
bestVersion = candidateVersion;
5757
}
58-
58+
5959
i += increment;
6060
}
6161
}
@@ -105,7 +105,7 @@ internal static int CompareVersions(string[] left, string[] right)
105105

106106
internal static void ParseRuntimeId(string runtimeId, out string osName, out string[] version, out string qualifiers)
107107
{
108-
// We use the following convention in all newly-defined RIDs. Some RIDs (win7-x64, win8-x64) predate this convention and don't follow it, but all new RIDs should follow it.
108+
// We use the following convention in all newly-defined RIDs. Some RIDs (win7-x64, win8-x64) predate this convention and don't follow it, but all new RIDs should follow it.
109109
// [os name].[version]-[architecture]-[additional qualifiers]
110110
// See https://github.com/dotnet/corefx/blob/master/pkg/Microsoft.NETCore.Platforms/readme.md#naming-convention
111111

src/GitVersionTask.MsBuild/TaskProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static class TaskProxy
1414

1515
static TaskProxy()
1616
{
17-
#if !NET472
17+
#if !NETFRAMEWORK
1818
GitLoaderContext.Init("GitVersionCore", "LibGit2Sharp");
1919
#endif
2020
LibGit2SharpLoader.LoadAssembly("GitVersionTask");

0 commit comments

Comments
 (0)