Skip to content

Commit d53fdb7

Browse files
committed
(#2997) net4.8 removal
1 parent 35f28bd commit d53fdb7

33 files changed

+12
-237
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
strategy:
130130
matrix:
131131
os: [windows-latest, ubuntu-latest, macos-latest]
132-
targetFramework: [net48, net6.0, netcoreapp3.1]
132+
targetFramework: [net6.0, netcoreapp3.1]
133133
fail-fast: false
134134

135135
steps:

build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,5 @@ public override void Run(BuildContext context)
4343
var netcoreExe = Paths.Integration.Combine("core").Combine("build").Combine(framework).CombineWithFilePath("app.dll");
4444
context.ValidateOutput("dotnet", netcoreExe.FullPath, context.Version.GitVersion.FullSemVer);
4545
}
46-
47-
context.Information("\nTesting msbuild task with msbuild (for full framework)\n");
48-
49-
var msBuildSettings = new MSBuildSettings
50-
{
51-
Verbosity = Verbosity.Minimal,
52-
Restore = true
53-
};
54-
55-
msBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
56-
msBuildSettings.WithProperty("RestoreSource", nugetSource);
57-
58-
context.MSBuild("./tests/integration/full", msBuildSettings);
59-
60-
var fullExe = Paths.Integration.Combine("full").Combine("build").CombineWithFilePath("app.exe");
61-
context.ValidateOutput(fullExe.FullPath, null, context.Version.GitVersion.FullSemVer);
6246
}
6347
}

build/build/Tasks/Test/UnitTest.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Build.Tasks;
88

99
[TaskName(nameof(UnitTest))]
1010
[TaskDescription("Run the unit tests")]
11-
[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60, Constants.CoreFxVersion31, Constants.FullFxVersion48)]
11+
[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60, Constants.CoreFxVersion31)]
1212
[IsDependentOn(typeof(Build))]
1313
public class UnitTest : FrostingTask<BuildContext>
1414
{
@@ -17,7 +17,7 @@ public class UnitTest : FrostingTask<BuildContext>
1717
public override void Run(BuildContext context)
1818
{
1919
var dotnetTarget = context.Argument(Arguments.DotnetTarget, string.Empty);
20-
var frameworks = new[] { Constants.CoreFxVersion31, Constants.FullFxVersion48, Constants.NetVersion60 };
20+
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 };
2121
if (!string.IsNullOrWhiteSpace(dotnetTarget))
2222
{
2323
if (!frameworks.Contains(dotnetTarget, StringComparer.OrdinalIgnoreCase))
@@ -87,11 +87,6 @@ private static void TestProjectForTarget(BuildContext context, FilePath project,
8787
Exclude = new List<string> { "[GitVersion*.Tests]*", "[GitTools.Testing]*" }
8888
};
8989

90-
if (string.Equals(framework, Constants.FullFxVersion48))
91-
{
92-
settings.Filter = context.IsRunningOnUnix() ? $"TestCategory!={Constants.NoMono}" : $"TestCategory!={Constants.NoNet48}";
93-
}
94-
9590
context.DotNetTest(project.FullPath, settings, coverletSettings);
9691
}
9792
}

build/common/Utilities/Constants.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ public class Constants
1010

1111
public const string NetVersion60 = "net6.0";
1212
public const string CoreFxVersion31 = "netcoreapp3.1";
13-
public const string FullFxVersion48 = "net48";
14-
15-
public const string NoMono = "NoMono";
16-
public const string NoNet48 = "NoNet48";
1713

1814
public static readonly string[] VersionsToBuild = { Version60, Version31 };
1915
public static readonly Architecture[] ArchToBuild = { Architecture.Amd64, Architecture.Arm64 };

src/Directory.Build.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@
8181
<None Include="../../build/nuspec/README.md" Pack="true" PackagePath="/"/>
8282
</ItemGroup>
8383

84-
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
85-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
86-
</ItemGroup>
87-
8884
<!-- Workaround to enable .editorconfig based analyzer configuration until dotnet compilers support .editorconfig based configuration -->
8985
<PropertyGroup>
9086
<SkipDefaultEditorConfigAsAdditionalFile>true</SkipDefaultEditorConfigAsAdditionalFile>

src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void WorkingDirectoryWithoutCommitsFailsWithInformativeMessage()
7373
public void WorkingDirectoryDoesNotExistFailsWithInformativeMessage()
7474
{
7575
var workingDirectory = Path.Combine(PathHelper.GetCurrentDirectory(), Guid.NewGuid().ToString("N"));
76-
var executable = PathHelper.GetExecutable();
76+
var executable = PathHelper.GetDotNetExecutable();
7777

7878
var output = new StringBuilder();
7979
var args = PathHelper.GetExecutableArgs($" /targetpath {workingDirectory} ");

src/GitVersion.App.Tests/GitVersion.App.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net48;netcoreapp3.1;net6.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
44

55
<IsTestProject>true</IsTestProject>
66
</PropertyGroup>
@@ -21,7 +21,6 @@
2121
<ItemGroup>
2222
<Compile Include="..\GitVersion.Core.Tests\Helpers\DirectoryHelper.cs" Link="Helpers\DirectoryHelper.cs" />
2323
<Compile Include="..\GitVersion.Core.Tests\Helpers\PathHelper.cs" Link="Helpers\PathHelper.cs" />
24-
<Compile Include="..\GitVersion.Core.Tests\Helpers\RuntimeHelper.cs" Link="Helpers\RuntimeHelper.cs" />
2524
<Compile Include="..\GitVersion.Core.Tests\Helpers\TestEffectiveConfiguration.cs" Link="Helpers\TestEffectiveConfiguration.cs" />
2625
<Compile Include="..\GitVersion.Core.Tests\Helpers\TestEnvironment.cs" Link="Helpers\TestEnvironment.cs" />
2726
<Compile Include="..\GitVersion.Core.Tests\Helpers\TestFileSystem.cs" Link="Helpers\TestFileSystem.cs" />

src/GitVersion.App.Tests/Helpers/GitVersionHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private static ExecutionResults ExecuteIn(ArgumentBuilder arguments,
3636
params KeyValuePair<string, string>[] environments
3737
)
3838
{
39-
var executable = PathHelper.GetExecutable();
39+
var executable = PathHelper.GetDotNetExecutable();
4040
var output = new StringBuilder();
4141

4242
var environmentalVariables = new Dictionary<string, string>

src/GitVersion.App/GitVersion.App.csproj

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
<DocumentationFile>bin\$(Configuration)\GitVersion.xml</DocumentationFile>
1111
</PropertyGroup>
1212

13-
<PropertyGroup Condition=" '$(PackAsTool)' != 'true'">
14-
<TargetFrameworks>net48;$(TargetFrameworks);</TargetFrameworks>
15-
</PropertyGroup>
16-
1713
<!-- workaround for https://github.com/dotnet/runtime/issues/49508 -->
1814
<PropertyGroup Condition=" '$(OsxArm64)' == 'true'">
1915
<TargetFrameworks>net6.0</TargetFrameworks>
@@ -26,11 +22,6 @@
2622
<PackageDescription>Derives SemVer information from a repository following GitFlow or GitHubFlow. This is the .NET Core Global Tool allowing usage of GitVersion from command line.</PackageDescription>
2723
</PropertyGroup>
2824

29-
<ItemGroup Condition="'$(TargetFramework)'=='net48'">
30-
<PackageReference Include="JetBrains.Annotations" Version="$(PackageVersion_JetBrainsAnnotations)" />
31-
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="$(PackageVersion_LibGit2Sharp_NativeBinaries)" />
32-
</ItemGroup>
33-
3425
<ItemGroup>
3526
<PackageReference Include="System.Text.Json" Version="$(PackageVersion_MicrosoftJson)" />
3627
<PackageReference Include="System.Text.Encodings.Web" Version="$(PackageVersion_MicrosoftJson)" />

src/GitVersion.Core.Tests/Configuration/ConfigProviderTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ public void NextVersionCanHavePatch()
226226

227227
[Test]
228228
[MethodImpl(MethodImplOptions.NoInlining)]
229-
[Category(NoMono)]
230-
[Description(NoMonoDescription)]
231229
public void CanWriteOutEffectiveConfiguration()
232230
{
233231
var config = this.configProvider.Provide(this.repoPath);

0 commit comments

Comments
 (0)