Skip to content

Commit 2a7a328

Browse files
committed
Retarget from net462 to net472
This allows us to update our libgit2sharp dependency. And while projects that use NB.GV may *target* net462 without a problem, NB.GV requiring that build machines have at least net472 installed seems totally reasonable.
1 parent 2c95cc7 commit 2a7a328

16 files changed

+33
-36
lines changed

src/NerdBank.GitVersioning/ManagedGit/GitPackDeltafiedStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public override long Position
6565
set => throw new NotImplementedException();
6666
}
6767

68-
#if NETSTANDARD2_0
68+
#if NETFRAMEWORK
6969
/// <summary>
7070
/// Reads a sequence of bytes from the current <see cref="GitPackDeltafiedStream"/> and advances the position
7171
/// within the stream by the number of bytes read.

src/NerdBank.GitVersioning/ManagedGit/GitPackMemoryCacheStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public override void Flush()
4444
throw new NotSupportedException();
4545
}
4646

47-
#if NETSTANDARD2_0
47+
#if NETFRAMEWORK
4848
public int Read(Span<byte> buffer)
4949
#else
5050
/// <inheritdoc/>

src/NerdBank.GitVersioning/ManagedGit/GitPackMemoryCacheViewStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public override int Read(byte[] buffer, int offset, int count)
4242
return this.Read(buffer.AsSpan(offset, count));
4343
}
4444

45-
#if NETSTANDARD2_0
45+
#if NETFRAMEWORK
4646
public int Read(Span<byte> buffer)
4747
#else
4848
/// <inheritdoc/>

src/NerdBank.GitVersioning/ManagedGit/GitPackPooledStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public override void Flush()
6262
this.stream.Flush();
6363
}
6464

65-
#if !NETSTANDARD2_0
65+
#if NET6_0_OR_GREATER
6666
/// <inheritdoc/>
6767
public override int Read(Span<byte> buffer)
6868
{

src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ public void Dispose()
668668

669669
private static string TrimEndingDirectorySeparator(string path)
670670
{
671-
#if NETSTANDARD2_0
671+
#if NETFRAMEWORK
672672
if (string.IsNullOrEmpty(path) || path.Length == 1)
673673
{
674674
return path;
@@ -699,7 +699,7 @@ private static bool TryConvertHexStringToByteArray(string hexString, Span<byte>
699699
Requires.Argument(data.Length == hexString.Length / 2, nameof(data), "Length must be exactly half that of " + nameof(hexString) + ".");
700700
for (int index = 0; index < data.Length; index++)
701701
{
702-
#if !NETSTANDARD2_0
702+
#if NET6_0_OR_GREATER
703703
ReadOnlySpan<char> byteValue = hexString.AsSpan(index * 2, 2);
704704
if (!byte.TryParse(byteValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out data[index]))
705705
{

src/NerdBank.GitVersioning/ManagedGit/MemoryMappedStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public override int Read(byte[] buffer, int offset, int count)
7373
return read;
7474
}
7575

76-
#if !NETSTANDARD2_0
76+
#if NET6_0_OR_GREATER
7777
/// <inheritdoc/>
7878
public override int Read(Span<byte> buffer)
7979
{

src/NerdBank.GitVersioning/ManagedGit/StreamExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static int ReadMbsInt(this Stream stream)
7878
return value;
7979
}
8080

81-
#if NETSTANDARD2_0
81+
#if NETFRAMEWORK
8282
/// <summary>
8383
/// Reads a sequence of bytes from the current stream and advances the position within the stream by
8484
/// the number of bytes read.

src/NerdBank.GitVersioning/ManagedGit/ZLibStream.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public override int Read(byte[] array, int offset, int count)
9292
return read;
9393
}
9494

95-
#if !NETSTANDARD2_0
95+
#if NET6_0_OR_GREATER
9696
/// <inheritdoc/>
9797
public override int Read(Span<byte> buffer)
9898
{
@@ -110,7 +110,7 @@ public override async Task<int> ReadAsync(byte[] array, int offset, int count, C
110110
return read;
111111
}
112112

113-
#if !NETSTANDARD2_0
113+
#if NET6_0_OR_GREATER
114114
/// <inheritdoc/>
115115
public override async ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
116116
{

src/NerdBank.GitVersioning/Nerdbank.GitVersioning.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net472;net6.0</TargetFrameworks>
44
<GenerateDocumentationFile>true</GenerateDocumentationFile>
55
<DebugType>Full</DebugType>
66
<IsPackable>false</IsPackable>

src/Nerdbank.GitVersioning.Tasks/AssemblyVersionInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ the code is regenerated.
3737
------------------------------------------------------------------------------
3838
";
3939

40-
#if NET462
40+
#if NETFRAMEWORK
4141
private static readonly CodeGeneratorOptions CodeGeneratorOptions = new CodeGeneratorOptions
4242
{
4343
BlankLinesBetweenMembers = false,
@@ -136,7 +136,7 @@ public string BuildCode()
136136
return null;
137137
}
138138

139-
#if NET462
139+
#if NETFRAMEWORK
140140
/// <inheritdoc/>
141141
public override bool Execute()
142142
{
@@ -186,7 +186,7 @@ public override bool Execute()
186186
}
187187
#endif
188188

189-
#if !NET462
189+
#if !NETFRAMEWORK
190190
/// <inheritdoc/>
191191
public override bool Execute()
192192
{
@@ -233,7 +233,7 @@ private static byte[] GetPublicKeyFromKeyPair(byte[] keyPair)
233233
}
234234
}
235235

236-
#if NET462
236+
#if NETFRAMEWORK
237237
private static CodeMemberField CreateField<T>(string name, T value)
238238
{
239239
return new CodeMemberField(typeof(T), name)

0 commit comments

Comments
 (0)