Skip to content

Commit 5e4d138

Browse files
committed
Drop support for .NET Framework 4.6.1
net461 support from Microsoft ended on April 26, 2022 per https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-framework
1 parent 719b0d5 commit 5e4d138

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

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 NET461
40+
#if NET462
4141
private static readonly CodeGeneratorOptions CodeGeneratorOptions = new CodeGeneratorOptions
4242
{
4343
BlankLinesBetweenMembers = false,
@@ -133,7 +133,7 @@ public string BuildCode()
133133
return null;
134134
}
135135

136-
#if NET461
136+
#if NET462
137137
/// <inheritdoc/>
138138
public override bool Execute()
139139
{
@@ -183,7 +183,7 @@ public override bool Execute()
183183
}
184184
#endif
185185

186-
#if !NET461
186+
#if !NET462
187187
/// <inheritdoc/>
188188
public override bool Execute()
189189
{
@@ -230,7 +230,7 @@ private static byte[] GetPublicKeyFromKeyPair(byte[] keyPair)
230230
}
231231
}
232232

233-
#if NET461
233+
#if NET462
234234
private static CodeMemberField CreateField<T>(string name, T value)
235235
{
236236
return new CodeMemberField(typeof(T), name)

src/Nerdbank.GitVersioning.Tasks/NativeVersionInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private void CreateDefines()
177177
{
178178
if (!int.TryParse(this.AssemblyLanguage, out lcid))
179179
{
180-
#if NET461
180+
#if NET462
181181
try
182182
{
183183
var cultureInfo = new CultureInfo(this.AssemblyLanguage);

src/Nerdbank.GitVersioning.Tasks/Nerdbank.GitVersioning.Tasks.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
3+
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
44
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
55

66
<NuSpecFile>Nerdbank.GitVersioning.nuspec</NuSpecFile>
@@ -27,7 +27,7 @@
2727
<Target Name="PackBuildOutputs" DependsOnTargets="SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup">
2828
<PropertyGroup>
2929
<BuildSubDir Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">MSBuildCore\</BuildSubDir>
30-
<BuildSubDir Condition=" '$(TargetFramework)' == 'net461' ">MSBuildFull\</BuildSubDir>
30+
<BuildSubDir Condition=" '$(TargetFramework)' == 'net462' ">MSBuildFull\</BuildSubDir>
3131
</PropertyGroup>
3232
<Error Text="Unrecognized TargetFramework" Condition=" '$(BuildSubDir)' == '' " />
3333
<ItemGroup>
@@ -71,7 +71,7 @@
7171
<ItemGroup>
7272
<ProjectReference Include="..\NerdBank.GitVersioning\Nerdbank.GitVersioning.csproj" />
7373
</ItemGroup>
74-
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
74+
<ItemGroup Condition="'$(TargetFramework)' == 'net462' ">
7575
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.9.20" />
7676
</ItemGroup>
7777
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">

src/Nerdbank.GitVersioning.Tasks/Nerdbank.GitVersioning.nuspec

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ IMPORTANT: The 3.x release may produce a different version height than prior maj
1717
<repository type="git" url="https://github.com/dotnet/Nerdbank.GitVersioning.git" commit="$commit$" />
1818
</metadata>
1919
<files>
20-
<file src="$BaseOutputPath$net461\LibGit2Sharp.dll" target="build\MSBuildFull\LibGit2Sharp.dll" />
21-
<file src="$BaseOutputPath$net461\LibGit2Sharp.dll.config" target="build\MSBuildFull\LibGit2Sharp.dll.config" />
22-
<file src="$BaseOutputPath$net461\Microsoft.DotNet.PlatformAbstractions.dll" target="build\MSBuildFull\Microsoft.DotNet.PlatformAbstractions.dll" />
23-
<file src="$BaseOutputPath$net461\Nerdbank.GitVersioning.dll" target="build\MSBuildFull\Nerdbank.GitVersioning.dll" />
24-
<file src="$BaseOutputPath$net461\Nerdbank.GitVersioning.Tasks.dll" target="build\MSBuildFull\Nerdbank.GitVersioning.Tasks.dll" />
25-
<file src="$BaseOutputPath$net461\Newtonsoft.Json.dll" target="build\MSBuildFull\Newtonsoft.Json.dll" />
26-
<file src="$BaseOutputPath$net461\System.Buffers.dll" target="build\MSBuildFull\System.Buffers.dll" />
27-
<file src="$BaseOutputPath$net461\System.Memory.dll" target="build\MSBuildFull\System.Memory.dll" />
28-
<file src="$BaseOutputPath$net461\System.Numerics.Vectors.dll" target="build\MSBuildFull\System.Numerics.Vectors.dll" />
29-
<file src="$BaseOutputPath$net461\System.Runtime.CompilerServices.Unsafe.dll" target="build\MSBuildFull\System.Runtime.CompilerServices.Unsafe.dll" />
30-
<file src="$BaseOutputPath$net461\System.Text.Json.dll" target="build\MSBuildFull\System.Text.Json.dll" />
31-
<file src="$BaseOutputPath$net461\Validation.dll" target="build\MSBuildFull\Validation.dll" />
20+
<file src="$BaseOutputPath$net462\LibGit2Sharp.dll" target="build\MSBuildFull\LibGit2Sharp.dll" />
21+
<file src="$BaseOutputPath$net462\LibGit2Sharp.dll.config" target="build\MSBuildFull\LibGit2Sharp.dll.config" />
22+
<file src="$BaseOutputPath$net462\Microsoft.DotNet.PlatformAbstractions.dll" target="build\MSBuildFull\Microsoft.DotNet.PlatformAbstractions.dll" />
23+
<file src="$BaseOutputPath$net462\Nerdbank.GitVersioning.dll" target="build\MSBuildFull\Nerdbank.GitVersioning.dll" />
24+
<file src="$BaseOutputPath$net462\Nerdbank.GitVersioning.Tasks.dll" target="build\MSBuildFull\Nerdbank.GitVersioning.Tasks.dll" />
25+
<file src="$BaseOutputPath$net462\Newtonsoft.Json.dll" target="build\MSBuildFull\Newtonsoft.Json.dll" />
26+
<file src="$BaseOutputPath$net462\System.Buffers.dll" target="build\MSBuildFull\System.Buffers.dll" />
27+
<file src="$BaseOutputPath$net462\System.Memory.dll" target="build\MSBuildFull\System.Memory.dll" />
28+
<file src="$BaseOutputPath$net462\System.Numerics.Vectors.dll" target="build\MSBuildFull\System.Numerics.Vectors.dll" />
29+
<file src="$BaseOutputPath$net462\System.Runtime.CompilerServices.Unsafe.dll" target="build\MSBuildFull\System.Runtime.CompilerServices.Unsafe.dll" />
30+
<file src="$BaseOutputPath$net462\System.Text.Json.dll" target="build\MSBuildFull\System.Text.Json.dll" />
31+
<file src="$BaseOutputPath$net462\Validation.dll" target="build\MSBuildFull\Validation.dll" />
3232
<file src="$LibGit2SharpNativeBinaries$runtimes\**" target="build\runtimes\" />
3333

3434
<!-- Additional copies to work around DllNotFoundException on Mono (https://github.com/dotnet/Nerdbank.GitVersioning/issues/222) -->

test/Nerdbank.GitVersioning.Benchmarks/Nerdbank.GitVersioning.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
5-
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net461</TargetFrameworks>
5+
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
66
<OutputType>Exe</OutputType>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
88
<PlatformTarget>AnyCPU</PlatformTarget>

test/Nerdbank.GitVersioning.Tests/Nerdbank.GitVersioning.Tests.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>net6.0;net461</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net462</TargetFrameworks>
44
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
55
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
66
<DebugType>full</DebugType>

0 commit comments

Comments
 (0)