From b22e8726683a0997484b53c5efd54394e93b5306 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 15 Jun 2020 15:39:29 +0300 Subject: [PATCH] Revert "GH-2095 - Target .net48 instead of .net472" This reverts commit 5330bbb2b93571c2e6ea8b91e2758798b28e52e4. --- build/pack.cake | 2 +- build/test.cake | 4 ++-- build/utils/parameters.cake | 2 +- src/Directory.Build.props | 2 +- src/Docker/Readme.md | 6 +++--- src/GitVersionCore.Tests/GitVersionCore.Tests.csproj | 2 +- src/GitVersionCore/GitVersionCore.csproj | 6 ++++-- src/GitVersionExe.Tests/GitVersionExe.Tests.csproj | 2 +- src/GitVersionExe/GitVersionExe.csproj | 4 ++-- src/GitVersionTask.MsBuild/GitVersionTask.MsBuild.csproj | 2 +- .../LibGit2Sharp/LibGit2SharpLoader.cs | 2 +- .../PlatformAbstraction/Native/NativeMethods.Unix.cs | 2 +- src/GitVersionTask.Tests/GitVersionTask.Tests.csproj | 2 +- src/GitVersionTask.Tests/Helpers/MsBuildExeFixture.cs | 2 +- src/GitVersionTask/GitVersionTask.csproj | 2 +- src/GitVersionTask/build/GitVersionTask.props | 2 +- src/GitVersionTask/nuget-files.props | 4 ++-- tests/integration/full/app.csproj | 6 +++--- 18 files changed, 28 insertions(+), 26 deletions(-) diff --git a/build/pack.cake b/build/pack.cake index 497e1faf54..e36fd51603 100644 --- a/build/pack.cake +++ b/build/pack.cake @@ -4,7 +4,7 @@ Task("Pack-Prepare") { PackPrepareNative(Context, parameters); - var frameworks = new[] { parameters.CoreFxVersion21, parameters.FullFxVersion48 }; + var frameworks = new[] { parameters.CoreFxVersion21, parameters.FullFxVersion472 }; // MsBuild Task foreach(var framework in frameworks) diff --git a/build/test.cake b/build/test.cake index 79b8308515..24b7e70cad 100644 --- a/build/test.cake +++ b/build/test.cake @@ -5,7 +5,7 @@ Task("UnitTest") .IsDependentOn("Build") .Does((parameters) => { - var frameworks = new[] { parameters.CoreFxVersion31, parameters.FullFxVersion48 }; + var frameworks = new[] { parameters.CoreFxVersion31, parameters.FullFxVersion472 }; var testResultsPath = parameters.Paths.Directories.TestResultsOutput; foreach(var framework in frameworks) @@ -39,7 +39,7 @@ Task("UnitTest") Exclude = new List { "[GitVersion*.Tests]*", "[GitVersionTask.MsBuild]*" } }; - if (IsRunningOnUnix() && string.Equals(framework, parameters.FullFxVersion48)) + if (IsRunningOnUnix() && string.Equals(framework, parameters.FullFxVersion472)) { settings.Filter = "TestCategory!=NoMono"; } diff --git a/build/utils/parameters.cake b/build/utils/parameters.cake index 882efbe788..54861b3ff9 100644 --- a/build/utils/parameters.cake +++ b/build/utils/parameters.cake @@ -12,7 +12,7 @@ public class BuildParameters public const string MainRepoName = "GitVersion"; public string CoreFxVersion21 { get; private set; } = "netcoreapp2.1"; public string CoreFxVersion31 { get; private set; } = "netcoreapp3.1"; - public string FullFxVersion48 { get; private set; } = "net48"; + public string FullFxVersion472 { get; private set; } = "net472"; public string DockerDistro { get; private set; } public string DockerDotnetVersion { get; private set; } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 4da94d8ef4..bb6a1ae104 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -66,7 +66,7 @@ - + diff --git a/src/Docker/Readme.md b/src/Docker/Readme.md index 56d40b2691..bc7863df11 100644 --- a/src/Docker/Readme.md +++ b/src/Docker/Readme.md @@ -1,17 +1,17 @@ # There are 4 variants of docker image -- based on **microsoft/dotnet-framework:4.8-runtime** - Windows Full FX +- based on **microsoft/dotnet-framework:4.7.2-runtime** - Windows Full FX - based on **microsoft/dotnet:2.1-runtime** - Windows dotnet core - based on **mono:5.18** - Linux Full FX - on mono - based on **microsoft/dotnet:2.1-runtime** - Linux dotnet core - based on **centos:7** - linux dotnet core To run on windows container run this -`docker run --rm -v "$(pwd):c:/repo" gittools/gitversion:latest-windows-net48 c:/repo` +`docker run --rm -v "$(pwd):c:/repo" gittools/gitversion:latest-windows-net472 c:/repo` `docker run --rm -v "$(pwd):c:/repo" gittools/gitversion:latest-windows-netcoreapp2.1 c:/repo` To run on linux container run this -`docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-linux-net48 /repo` +`docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-linux-net472 /repo` `docker run --rm -v "$(pwd):/repo" gittools/gitversion:latest-linux-netcoreapp2.1 /repo` diff --git a/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj b/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj index 0c4d78924a..21cb268b20 100644 --- a/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj +++ b/src/GitVersionCore.Tests/GitVersionCore.Tests.csproj @@ -1,7 +1,7 @@ - net48;netcoreapp2.1;netcoreapp3.1 + net472;netcoreapp2.1;netcoreapp3.1 full false diff --git a/src/GitVersionCore/GitVersionCore.csproj b/src/GitVersionCore/GitVersionCore.csproj index beab4634e3..2c81d5d185 100644 --- a/src/GitVersionCore/GitVersionCore.csproj +++ b/src/GitVersionCore/GitVersionCore.csproj @@ -14,8 +14,6 @@ - - @@ -23,6 +21,10 @@ + + + + diff --git a/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj b/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj index 16ccf1adf7..706347408a 100644 --- a/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj +++ b/src/GitVersionExe.Tests/GitVersionExe.Tests.csproj @@ -1,6 +1,6 @@ - net48;netcoreapp2.1;netcoreapp3.1 + net472;netcoreapp2.1;netcoreapp3.1 true diff --git a/src/GitVersionExe/GitVersionExe.csproj b/src/GitVersionExe/GitVersionExe.csproj index e4410bcd5e..0ef0563be2 100644 --- a/src/GitVersionExe/GitVersionExe.csproj +++ b/src/GitVersionExe/GitVersionExe.csproj @@ -12,7 +12,7 @@ - net48;$(TargetFrameworks); + net472;$(TargetFrameworks); @@ -21,7 +21,7 @@ Derives SemVer information from a repository following GitFlow or GitHubFlow. This is the .NET Core Global Tool allowing usage of GitVersion from command line. - + diff --git a/src/GitVersionTask.MsBuild/GitVersionTask.MsBuild.csproj b/src/GitVersionTask.MsBuild/GitVersionTask.MsBuild.csproj index b2b10f3e7f..c7a939ac9f 100644 --- a/src/GitVersionTask.MsBuild/GitVersionTask.MsBuild.csproj +++ b/src/GitVersionTask.MsBuild/GitVersionTask.MsBuild.csproj @@ -1,7 +1,7 @@  - net48;netstandard2.0 + net472;netstandard2.0 true diff --git a/src/GitVersionTask.MsBuild/LibGit2Sharp/LibGit2SharpLoader.cs b/src/GitVersionTask.MsBuild/LibGit2Sharp/LibGit2SharpLoader.cs index 4fda343a49..b6ffedc2ed 100644 --- a/src/GitVersionTask.MsBuild/LibGit2Sharp/LibGit2SharpLoader.cs +++ b/src/GitVersionTask.MsBuild/LibGit2Sharp/LibGit2SharpLoader.cs @@ -4,7 +4,7 @@ using System.IO; using System.Reflection; -#if NETFRAMEWORK +#if NET472 using System; using System.Collections.Generic; #endif diff --git a/src/GitVersionTask.MsBuild/PlatformAbstraction/Native/NativeMethods.Unix.cs b/src/GitVersionTask.MsBuild/PlatformAbstraction/Native/NativeMethods.Unix.cs index 43055cbf6d..1c6a97aaf8 100644 --- a/src/GitVersionTask.MsBuild/PlatformAbstraction/Native/NativeMethods.Unix.cs +++ b/src/GitVersionTask.MsBuild/PlatformAbstraction/Native/NativeMethods.Unix.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#if NETFRAMEWORK +#if NET45 using System; using System.Runtime.InteropServices; diff --git a/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj b/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj index f8a9604139..46fb7503a3 100644 --- a/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj +++ b/src/GitVersionTask.Tests/GitVersionTask.Tests.csproj @@ -1,6 +1,6 @@ - net48;netcoreapp2.1;netcoreapp3.1 + net472;netcoreapp2.1;netcoreapp3.1 true diff --git a/src/GitVersionTask.Tests/Helpers/MsBuildExeFixture.cs b/src/GitVersionTask.Tests/Helpers/MsBuildExeFixture.cs index 146043fc27..f31ae99957 100644 --- a/src/GitVersionTask.Tests/Helpers/MsBuildExeFixture.cs +++ b/src/GitVersionTask.Tests/Helpers/MsBuildExeFixture.cs @@ -67,7 +67,7 @@ public void CreateTestProject(Action extendProject) var project = RuntimeFramework.CurrentFramework.Runtime switch { RuntimeType.NetCore => ProjectCreator.Templates.SdkCsproj(ProjectPath), - RuntimeType.Net => ProjectCreator.Templates.LegacyCsproj(ProjectPath, defaultTargets: null, targetFrameworkVersion: "v4.8", toolsVersion: "15.0"), + RuntimeType.Net => ProjectCreator.Templates.LegacyCsproj(ProjectPath, defaultTargets: null, targetFrameworkVersion: "v4.7.2", toolsVersion: "15.0"), _ => null }; diff --git a/src/GitVersionTask/GitVersionTask.csproj b/src/GitVersionTask/GitVersionTask.csproj index bc195bd191..f7ebd22f2b 100644 --- a/src/GitVersionTask/GitVersionTask.csproj +++ b/src/GitVersionTask/GitVersionTask.csproj @@ -1,7 +1,7 @@ - net48;netcoreapp2.1 + net472;netcoreapp2.1 GitVersionTask GitVersionTask diff --git a/src/GitVersionTask/build/GitVersionTask.props b/src/GitVersionTask/build/GitVersionTask.props index 21ebdb02aa..d1c05b5edc 100644 --- a/src/GitVersionTask/build/GitVersionTask.props +++ b/src/GitVersionTask/build/GitVersionTask.props @@ -1,7 +1,7 @@ - $(MSBuildThisFileDirectory)..\tools\net48\GitVersionTask.MsBuild.dll + $(MSBuildThisFileDirectory)..\tools\net472\GitVersionTask.MsBuild.dll $(MSBuildThisFileDirectory)..\tools\netstandard2.0\GitVersionTask.MsBuild.dll $(MSBuildProjectDirectory)\..\ diff --git a/src/GitVersionTask/nuget-files.props b/src/GitVersionTask/nuget-files.props index 11f7736660..f331f5789a 100644 --- a/src/GitVersionTask/nuget-files.props +++ b/src/GitVersionTask/nuget-files.props @@ -1,9 +1,9 @@ - bin/$(Configuration)/net48 + bin/$(Configuration)/net472 bin/$(Configuration)/netcoreapp2.1/publish - tools/net48 + tools/net472 tools/netstandard2.0 diff --git a/tests/integration/full/app.csproj b/tests/integration/full/app.csproj index 67a478fbf0..262e94d7f0 100644 --- a/tests/integration/full/app.csproj +++ b/tests/integration/full/app.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {C1765652-F8AE-4FFD-AFC8-72054A5A91B7} - v4.8 + v4.7.2 512 true true @@ -14,7 +14,7 @@ AnyCPU true full - false + false DEBUG;TRACE prompt 4 @@ -22,7 +22,7 @@ AnyCPU pdbonly - true + true TRACE prompt 4