diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 777f4ebf4e..ddf5f18ac3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - targetFramework: [net48, net6.0, netcoreapp3.1] + targetFramework: [net6.0, netcoreapp3.1] fail-fast: false steps: diff --git a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs index d8a875d91a..006c3a159c 100644 --- a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs +++ b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs @@ -43,21 +43,5 @@ public override void Run(BuildContext context) var netcoreExe = Paths.Integration.Combine("core").Combine("build").Combine(framework).CombineWithFilePath("app.dll"); context.ValidateOutput("dotnet", netcoreExe.FullPath, context.Version.GitVersion.FullSemVer); } - - context.Information("\nTesting msbuild task with msbuild (for full framework)\n"); - - var msBuildSettings = new MSBuildSettings - { - Verbosity = Verbosity.Minimal, - Restore = true - }; - - msBuildSettings.WithProperty("GitVersionMsBuildVersion", version); - msBuildSettings.WithProperty("RestoreSource", nugetSource); - - context.MSBuild("./tests/integration/full", msBuildSettings); - - var fullExe = Paths.Integration.Combine("full").Combine("build").CombineWithFilePath("app.exe"); - context.ValidateOutput(fullExe.FullPath, null, context.Version.GitVersion.FullSemVer); } } diff --git a/build/build/Tasks/Test/UnitTest.cs b/build/build/Tasks/Test/UnitTest.cs index 67b089e4c2..511fad62f3 100644 --- a/build/build/Tasks/Test/UnitTest.cs +++ b/build/build/Tasks/Test/UnitTest.cs @@ -8,7 +8,7 @@ namespace Build.Tasks; [TaskName(nameof(UnitTest))] [TaskDescription("Run the unit tests")] -[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60, Constants.CoreFxVersion31, Constants.FullFxVersion48)] +[TaskArgument(Arguments.DotnetTarget, Constants.NetVersion60, Constants.CoreFxVersion31)] [IsDependentOn(typeof(Build))] public class UnitTest : FrostingTask { @@ -17,7 +17,7 @@ public class UnitTest : FrostingTask public override void Run(BuildContext context) { var dotnetTarget = context.Argument(Arguments.DotnetTarget, string.Empty); - var frameworks = new[] { Constants.CoreFxVersion31, Constants.FullFxVersion48, Constants.NetVersion60 }; + var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion60 }; if (!string.IsNullOrWhiteSpace(dotnetTarget)) { if (!frameworks.Contains(dotnetTarget, StringComparer.OrdinalIgnoreCase)) @@ -87,11 +87,6 @@ private static void TestProjectForTarget(BuildContext context, FilePath project, Exclude = new List { "[GitVersion*.Tests]*", "[GitTools.Testing]*" } }; - if (string.Equals(framework, Constants.FullFxVersion48)) - { - settings.Filter = context.IsRunningOnUnix() ? $"TestCategory!={Constants.NoMono}" : $"TestCategory!={Constants.NoNet48}"; - } - context.DotNetTest(project.FullPath, settings, coverletSettings); } } diff --git a/build/common/Utilities/Constants.cs b/build/common/Utilities/Constants.cs index bff8009b09..571ee779e9 100644 --- a/build/common/Utilities/Constants.cs +++ b/build/common/Utilities/Constants.cs @@ -10,10 +10,6 @@ public class Constants public const string NetVersion60 = "net6.0"; public const string CoreFxVersion31 = "netcoreapp3.1"; - public const string FullFxVersion48 = "net48"; - - public const string NoMono = "NoMono"; - public const string NoNet48 = "NoNet48"; public static readonly string[] VersionsToBuild = { Version60, Version31 }; public static readonly Architecture[] ArchToBuild = { Architecture.Amd64, Architecture.Arm64 }; diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 560503b740..6c4a7136f2 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -81,10 +81,6 @@ - - - - true diff --git a/src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs b/src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs index 75a2079632..4f1eb269c7 100644 --- a/src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs +++ b/src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs @@ -73,7 +73,7 @@ public void WorkingDirectoryWithoutCommitsFailsWithInformativeMessage() public void WorkingDirectoryDoesNotExistFailsWithInformativeMessage() { var workingDirectory = Path.Combine(PathHelper.GetCurrentDirectory(), Guid.NewGuid().ToString("N")); - var executable = PathHelper.GetExecutable(); + var executable = PathHelper.GetDotNetExecutable(); var output = new StringBuilder(); var args = PathHelper.GetExecutableArgs($" /targetpath {workingDirectory} "); diff --git a/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj b/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj index 5b8c5a9d3a..d11566667a 100644 --- a/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj +++ b/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj @@ -1,6 +1,6 @@ - net48;netcoreapp3.1;net6.0 + netcoreapp3.1;net6.0 true @@ -21,7 +21,6 @@ - diff --git a/src/GitVersion.App.Tests/Helpers/GitVersionHelper.cs b/src/GitVersion.App.Tests/Helpers/GitVersionHelper.cs index a48f331f12..6654bc1fd0 100644 --- a/src/GitVersion.App.Tests/Helpers/GitVersionHelper.cs +++ b/src/GitVersion.App.Tests/Helpers/GitVersionHelper.cs @@ -36,7 +36,7 @@ private static ExecutionResults ExecuteIn(ArgumentBuilder arguments, params KeyValuePair[] environments ) { - var executable = PathHelper.GetExecutable(); + var executable = PathHelper.GetDotNetExecutable(); var output = new StringBuilder(); var environmentalVariables = new Dictionary diff --git a/src/GitVersion.App/GitVersion.App.csproj b/src/GitVersion.App/GitVersion.App.csproj index e4df4dfaea..c0c2ff8562 100644 --- a/src/GitVersion.App/GitVersion.App.csproj +++ b/src/GitVersion.App/GitVersion.App.csproj @@ -10,10 +10,6 @@ bin\$(Configuration)\GitVersion.xml - - net48;$(TargetFrameworks); - - net6.0 @@ -26,11 +22,6 @@ 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/GitVersion.Core.Tests/Configuration/ConfigProviderTests.cs b/src/GitVersion.Core.Tests/Configuration/ConfigProviderTests.cs index 48e7412cf2..6411fc66fa 100644 --- a/src/GitVersion.Core.Tests/Configuration/ConfigProviderTests.cs +++ b/src/GitVersion.Core.Tests/Configuration/ConfigProviderTests.cs @@ -226,8 +226,6 @@ public void NextVersionCanHavePatch() [Test] [MethodImpl(MethodImplOptions.NoInlining)] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CanWriteOutEffectiveConfiguration() { var config = this.configProvider.Provide(this.repoPath); diff --git a/src/GitVersion.Core.Tests/Configuration/Init/InitScenarios.cs b/src/GitVersion.Core.Tests/Configuration/Init/InitScenarios.cs index 5f2de3dedb..c716473ad4 100644 --- a/src/GitVersion.Core.Tests/Configuration/Init/InitScenarios.cs +++ b/src/GitVersion.Core.Tests/Configuration/Init/InitScenarios.cs @@ -16,8 +16,6 @@ public class InitScenarios : TestBase public void Setup() => ShouldlyConfiguration.ShouldMatchApprovedDefaults.LocateTestMethodUsingAttribute(); [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CanSetNextVersion() { var workingDirectory = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "c:\\proj" : "/proj"; diff --git a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs index 5600abb0ca..cf77ea7cd3 100644 --- a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs +++ b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs @@ -72,8 +72,6 @@ public void GitPreparerShouldNotFailWhenTargetPathNotInitialized() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CacheKeyForWorktree() { using var fixture = new EmptyRepositoryFixture(); @@ -410,8 +408,6 @@ public void WorkingDirectoryWithoutCommits() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void GetProjectRootDirectoryWorkingDirectoryWithWorktree() { using var fixture = new EmptyRepositoryFixture(); @@ -479,8 +475,6 @@ public void GetDotGitDirectoryNoWorktree() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void GetDotGitDirectoryWorktree() { using var fixture = new EmptyRepositoryFixture(); @@ -511,8 +505,6 @@ public void GetDotGitDirectoryWorktree() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CalculateVersionFromWorktreeHead() { // Setup @@ -542,8 +534,6 @@ public void CalculateVersionFromWorktreeHead() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CalculateVersionVariables_TwoBranchHasSameCommitHeadDetachedAndNotTagged_ThrowException() { // Setup @@ -573,8 +563,6 @@ public void CalculateVersionVariables_TwoBranchHasSameCommitHeadDetachedAndNotTa } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CalculateVersionVariables_TwoBranchHasSameCommitHeadDetachedAndTagged_ReturnSemver() { // Setup diff --git a/src/GitVersion.Core.Tests/Extensions/StringFormatWithExtensionTests.cs b/src/GitVersion.Core.Tests/Extensions/StringFormatWithExtensionTests.cs index 0ec9d0aad2..b900791a50 100644 --- a/src/GitVersion.Core.Tests/Extensions/StringFormatWithExtensionTests.cs +++ b/src/GitVersion.Core.Tests/Extensions/StringFormatWithExtensionTests.cs @@ -16,9 +16,8 @@ public class StringFormatWithExtensionTests public void FormatWithNoTokens() { var propertyObject = new { }; - const string target = "Some String without tokens"; - var expected = target; - var actual = target.FormatWith(propertyObject, this.environment); + const string expected = "Some String without tokens"; + var actual = expected.FormatWith(propertyObject, this.environment); Assert.AreEqual(expected, actual); } diff --git a/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj b/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj index 80c758be6e..3de50c8baf 100644 --- a/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj +++ b/src/GitVersion.Core.Tests/GitVersion.Core.Tests.csproj @@ -1,7 +1,7 @@ - net48;netcoreapp3.1;net6.0 + netcoreapp3.1;net6.0 full false diff --git a/src/GitVersion.Core.Tests/Helpers/PathHelper.cs b/src/GitVersion.Core.Tests/Helpers/PathHelper.cs index 2b9288ad8e..50ea73fab9 100644 --- a/src/GitVersion.Core.Tests/Helpers/PathHelper.cs +++ b/src/GitVersion.Core.Tests/Helpers/PathHelper.cs @@ -4,14 +4,11 @@ public static class PathHelper { public static string GetCurrentDirectory() => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - public static string GetExecutable() => RuntimeHelper.IsCoreClr() ? "dotnet" : Path.Combine(GetExeDirectory(), "gitversion.exe"); + public static string GetDotNetExecutable() => "dotnet"; public static string GetExecutableArgs(string args) { - if (RuntimeHelper.IsCoreClr()) - { - args = $"{Path.Combine(GetExeDirectory(), "gitversion.dll")} {args}"; - } + args = $"{Path.Combine(GetExeDirectory(), "gitversion.dll")} {args}"; return args; } diff --git a/src/GitVersion.Core.Tests/Helpers/RuntimeHelper.cs b/src/GitVersion.Core.Tests/Helpers/RuntimeHelper.cs deleted file mode 100644 index 315bf717d1..0000000000 --- a/src/GitVersion.Core.Tests/Helpers/RuntimeHelper.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace GitVersion.Core.Tests.Helpers; - -public static class RuntimeHelper -{ -#if !NETFRAMEWORK - private static bool? _isCoreClr; -#endif - - public static bool IsCoreClr() - { -#if !NETFRAMEWORK - _isCoreClr ??= System.Environment.Version.Major >= 5 - || System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.StartsWith(".NET Core"); - return _isCoreClr.Value; -#else -#pragma warning disable IDE0022 // Use expression body for methods // Cannot be set because of the pragma section - return false; -#pragma warning restore IDE0022 // Use expression body for methods -#endif - } -} diff --git a/src/GitVersion.Core.Tests/Helpers/TestBase.cs b/src/GitVersion.Core.Tests/Helpers/TestBase.cs index 55a3a7a862..a97ebc3e03 100644 --- a/src/GitVersion.Core.Tests/Helpers/TestBase.cs +++ b/src/GitVersion.Core.Tests/Helpers/TestBase.cs @@ -8,9 +8,6 @@ namespace GitVersion.Core.Tests.Helpers; public class TestBase { - protected const string NoMonoDescription = "Won't run on Mono due to source information not being available for ShouldMatchApproved."; - protected const string NoMono = "NoMono"; - protected const string NoNet48 = "NoNet48"; public const string MainBranch = "main"; protected static IServiceProvider ConfigureServices(Action overrideServices = null) diff --git a/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs index df44f16e3c..095428c32d 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs @@ -8,10 +8,7 @@ namespace GitVersion.Core.Tests.IntegrationTests; [TestFixture] public class WorktreeScenarios : TestBase { - [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UseWorktreeRepositoryForVersion() { using var fixture = new EmptyRepositoryFixture(); diff --git a/src/GitVersion.Core.Tests/VersionCalculation/JsonVersionBuilderTests.cs b/src/GitVersion.Core.Tests/VersionCalculation/JsonVersionBuilderTests.cs index 9ffaa56d5e..6950c2b0d2 100644 --- a/src/GitVersion.Core.Tests/VersionCalculation/JsonVersionBuilderTests.cs +++ b/src/GitVersion.Core.Tests/VersionCalculation/JsonVersionBuilderTests.cs @@ -13,8 +13,6 @@ public class JsonVersionBuilderTests : TestBase public void Setup() => ShouldlyConfiguration.ShouldMatchApprovedDefaults.LocateTestMethodUsingAttribute(); [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void Json() { var semanticVersion = new SemanticVersion diff --git a/src/GitVersion.Core.Tests/VersionCalculation/VariableProviderTests.cs b/src/GitVersion.Core.Tests/VersionCalculation/VariableProviderTests.cs index da75c10c64..044a67682b 100644 --- a/src/GitVersion.Core.Tests/VersionCalculation/VariableProviderTests.cs +++ b/src/GitVersion.Core.Tests/VersionCalculation/VariableProviderTests.cs @@ -48,8 +48,6 @@ public void ShouldLogWarningWhenUsingDefaultInformationalVersionInCustomFormat() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeliveryModeForPreRelease() { var semVer = new SemanticVersion @@ -75,8 +73,6 @@ public void ProvidesVariablesInContinuousDeliveryModeForPreRelease() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeliveryModeForPreReleaseWithPadding() { var semVer = new SemanticVersion @@ -102,8 +98,6 @@ public void ProvidesVariablesInContinuousDeliveryModeForPreReleaseWithPadding() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeploymentModeForPreRelease() { var semVer = new SemanticVersion @@ -128,8 +122,6 @@ public void ProvidesVariablesInContinuousDeploymentModeForPreRelease() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeliveryModeForStable() { var semVer = new SemanticVersion @@ -153,8 +145,6 @@ public void ProvidesVariablesInContinuousDeliveryModeForStable() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeploymentModeForStable() { var semVer = new SemanticVersion @@ -178,8 +168,6 @@ public void ProvidesVariablesInContinuousDeploymentModeForStable() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeploymentModeForStableWhenCurrentCommitIsTagged() { var semVer = new SemanticVersion @@ -251,8 +239,6 @@ public void ProvidesVariablesInContinuousDeploymentModeWithTagSetToUseBranchName } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeliveryModeForFeatureBranch() { var semVer = new SemanticVersion @@ -278,8 +264,6 @@ public void ProvidesVariablesInContinuousDeliveryModeForFeatureBranch() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ProvidesVariablesInContinuousDeliveryModeForFeatureBranchWithCustomAssemblyInfoFormat() { var semVer = new SemanticVersion diff --git a/src/GitVersion.Core.Tests/VersionConverters/AssemblyInfoFileUpdaterTests.cs b/src/GitVersion.Core.Tests/VersionConverters/AssemblyInfoFileUpdaterTests.cs index 90719800d6..2f9ce399a9 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/AssemblyInfoFileUpdaterTests.cs +++ b/src/GitVersion.Core.Tests/VersionConverters/AssemblyInfoFileUpdaterTests.cs @@ -34,8 +34,6 @@ public void Setup() [TestCase("cs")] [TestCase("fs")] [TestCase("vb")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo(string fileExtension) { var workingDir = Path.GetTempPath(); @@ -52,8 +50,6 @@ public void ShouldCreateAssemblyInfoFileWhenNotExistsAndEnsureAssemblyInfo(strin [TestCase("cs")] [TestCase("fs")] [TestCase("vb")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo(string fileExtension) { var workingDir = Path.GetTempPath(); @@ -70,8 +66,6 @@ public void ShouldCreateAssemblyInfoFileAtPathWhenNotExistsAndEnsureAssemblyInfo [TestCase("cs")] [TestCase("fs")] [TestCase("vb")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ShouldCreateAssemblyInfoFilesAtPathWhenNotExistsAndEnsureAssemblyInfo(string fileExtension) { var workingDir = Path.GetTempPath(); @@ -161,8 +155,6 @@ public void ShouldReplaceAssemblyVersion(string fileExtension, string assemblyFi [TestCase("cs", "[assembly: AssemblyFileVersion(\"1.0.0.0\")]")] [TestCase("fs", "[]")] [TestCase("vb", "")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ShouldNotReplaceAssemblyVersionWhenVersionSchemeIsNone(string fileExtension, string assemblyFileContent) { var workingDir = Path.GetTempPath(); @@ -374,8 +366,6 @@ public void ShouldReplaceAssemblyVersionInRelativePathWithVariablesAndWhiteSpace [TestCase("cs", "[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]")] [TestCase("fs", "[]\r\n[]")] [TestCase("vb", "\r\n")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile(string fileExtension, string assemblyFileContent) { var workingDir = Path.GetTempPath(); @@ -395,8 +385,6 @@ public void ShouldAddAssemblyInformationalVersionWhenUpdatingAssemblyVersionFile [TestCase("cs", "[assembly: AssemblyVersion(\"1.0.0.0\")]\r\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\r\n// comment\r\n")] [TestCase("fs", "[]\r\n[]\r\ndo\r\n()\r\n")] [TestCase("vb", "\r\n\r\n' comment\r\n")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttributes(string fileExtension, string assemblyFileContent) { var workingDir = Path.GetTempPath(); @@ -416,8 +404,6 @@ public void Issue1183ShouldAddFSharpAssemblyInformationalVersionBesideOtherAttri [TestCase("cs", "[assembly: AssemblyFileVersion(\"1.0.0.0\")]")] [TestCase("fs", "[]")] [TestCase("vb", "")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ShouldNotAddAssemblyInformationalVersionWhenVersionSchemeIsNone(string fileExtension, string assemblyFileContent) { var workingDir = Path.GetTempPath(); diff --git a/src/GitVersion.Core.Tests/VersionConverters/GitVersionInfoGeneratorTests.cs b/src/GitVersion.Core.Tests/VersionConverters/GitVersionInfoGeneratorTests.cs index 0d6e697599..1f0d602dd3 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/GitVersionInfoGeneratorTests.cs +++ b/src/GitVersion.Core.Tests/VersionConverters/GitVersionInfoGeneratorTests.cs @@ -17,8 +17,6 @@ public class GitVersionInfoGeneratorTests : TestBase [TestCase("cs")] [TestCase("fs")] [TestCase("vb")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void ShouldCreateFile(string fileExtension) { var directory = Path.GetTempPath(); diff --git a/src/GitVersion.Core.Tests/VersionConverters/ProjectFileUpdaterTests.cs b/src/GitVersion.Core.Tests/VersionConverters/ProjectFileUpdaterTests.cs index 93b890d46a..20907a6a8d 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/ProjectFileUpdaterTests.cs +++ b/src/GitVersion.Core.Tests/VersionConverters/ProjectFileUpdaterTests.cs @@ -36,8 +36,6 @@ public void Setup() this.projectFileUpdater = new ProjectFileUpdater(this.log, this.fileSystem!); } - [Category(NoMono)] - [Description(NoMonoDescription)] [TestCase("Microsoft.NET.Sdk")] [TestCase("Microsoft.NET.Sdk.Worker")] [TestCase("Microsoft.NET.Sdk.Web")] @@ -68,8 +66,6 @@ public void CanUpdateProjectFileWithSdkProjectFileXml(string sdk) ")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CannotUpdateProjectFileWithIncorrectProjectSdk(string xml) { var canUpdate = projectFileUpdater.CanUpdateProjectFile(XElement.Parse(xml)); @@ -89,8 +85,6 @@ public void CannotUpdateProjectFileWithIncorrectProjectSdk(string xml) ")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CannotUpdateProjectFileWithMissingProjectSdk(string xml) { var canUpdate = projectFileUpdater.CanUpdateProjectFile(XElement.Parse(xml)); @@ -111,8 +105,6 @@ public void CannotUpdateProjectFileWithMissingProjectSdk(string xml) ")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CannotUpdateProjectFileWithoutAssemblyInfoGeneration(string xml) { var canUpdate = projectFileUpdater.CanUpdateProjectFile(XElement.Parse(xml)); @@ -128,8 +120,6 @@ public void CannotUpdateProjectFileWithoutAssemblyInfoGeneration(string xml) ")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void CannotUpdateProjectFileWithoutAPropertyGroup(string xml) { var canUpdate = projectFileUpdater.CanUpdateProjectFile(XElement.Parse(xml)); @@ -149,8 +139,6 @@ public void CannotUpdateProjectFileWithoutAPropertyGroup(string xml) " )] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UpdateProjectXmlVersionElementWithStandardXmlInsertsElement(string xml) { var variables = this.variableProvider.GetVariablesFor(SemanticVersion.Parse("2.0.0", "v"), new TestEffectiveConfiguration(), false); @@ -177,8 +165,6 @@ public void UpdateProjectXmlVersionElementWithStandardXmlInsertsElement(string x " )] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UpdateProjectXmlVersionElementWithStandardXmlModifiesElement(string xml) { var variables = this.variableProvider.GetVariablesFor(SemanticVersion.Parse("2.0.0", "v"), new TestEffectiveConfiguration(), false); @@ -208,8 +194,6 @@ public void UpdateProjectXmlVersionElementWithStandardXmlModifiesElement(string " )] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UpdateProjectXmlVersionElementWithDuplicatePropertyGroupsModifiesLastElement(string xml) { var variables = this.variableProvider.GetVariablesFor(SemanticVersion.Parse("2.0.0", "v"), new TestEffectiveConfiguration(), false); @@ -240,8 +224,6 @@ public void UpdateProjectXmlVersionElementWithDuplicatePropertyGroupsModifiesLas " )] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UpdateProjectXmlVersionElementWithMultipleVersionElementsLastOneIsModified(string xml) { var variables = this.variableProvider.GetVariablesFor(SemanticVersion.Parse("2.0.0", "v"), new TestEffectiveConfiguration(), false); @@ -267,8 +249,6 @@ public void UpdateProjectXmlVersionElementWithMultipleVersionElementsLastOneIsMo netcoreapp3.1 ")] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UpdateProjectFileAddsVersionToFile(string xml) { var fileName = Path.Combine(Path.GetTempPath(), "TestProject.csproj"); diff --git a/src/GitVersion.Core.Tests/VersionConverters/WixFileTests.cs b/src/GitVersion.Core.Tests/VersionConverters/WixFileTests.cs index e85cf93c97..3a8f975405 100644 --- a/src/GitVersion.Core.Tests/VersionConverters/WixFileTests.cs +++ b/src/GitVersion.Core.Tests/VersionConverters/WixFileTests.cs @@ -16,8 +16,6 @@ internal class WixFileTests : TestBase public void Setup() => ShouldlyConfiguration.ShouldMatchApprovedDefaults.LocateTestMethodUsingAttribute(); [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UpdateWixVersionFile() { var workingDir = Path.GetTempPath(); @@ -59,8 +57,6 @@ public void UpdateWixVersionFile() } [Test] - [Category(NoMono)] - [Description(NoMonoDescription)] public void UpdateWixVersionFileWhenFileAlreadyExists() { var workingDir = Path.GetTempPath(); diff --git a/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj b/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj index 588c3d3218..8231e67e08 100644 --- a/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj +++ b/src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj @@ -1,7 +1,7 @@ - net48;netcoreapp3.1;net6.0 + netcoreapp3.1;net6.0 true @@ -12,7 +12,7 @@ - + @@ -30,7 +30,6 @@ - diff --git a/src/GitVersion.MsBuild.Tests/Helpers/MsBuildExeFixture.cs b/src/GitVersion.MsBuild.Tests/Helpers/MsBuildExeFixture.cs index 4fef8ebbc7..85734297b3 100644 --- a/src/GitVersion.MsBuild.Tests/Helpers/MsBuildExeFixture.cs +++ b/src/GitVersion.MsBuild.Tests/Helpers/MsBuildExeFixture.cs @@ -2,7 +2,6 @@ using Buildalyzer.Environment; using GitTools.Testing; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.Helpers; using Microsoft.Build.Framework; using Microsoft.Build.Logging; using Microsoft.Build.Utilities.ProjectCreation; @@ -63,10 +62,7 @@ public MsBuildExeFixtureResult Execute() public void CreateTestProject(Action extendProject) { - var project = RuntimeHelper.IsCoreClr() - ? ProjectCreator.Templates.SdkCsproj(this.ProjectPath) - : ProjectCreator.Templates.LegacyCsproj(this.ProjectPath, defaultTargets: null, targetFrameworkVersion: "v4.8", toolsVersion: "15.0"); - + var project = ProjectCreator.Templates.SdkCsproj(this.ProjectPath); if (project == null) return; extendProject(project); diff --git a/src/GitVersion.MsBuild.Tests/Tasks/GenerateGitVersionInformationTest.cs b/src/GitVersion.MsBuild.Tests/Tasks/GenerateGitVersionInformationTest.cs index 78202fba1d..78e3dd5f89 100644 --- a/src/GitVersion.MsBuild.Tests/Tasks/GenerateGitVersionInformationTest.cs +++ b/src/GitVersion.MsBuild.Tests/Tasks/GenerateGitVersionInformationTest.cs @@ -50,8 +50,6 @@ public void GenerateGitVersionInformationTaskShouldCreateFileInBuildServer() } [Test] - [Category(NoNet48)] - [Category(NoMono)] public void GenerateGitVersionInformationTaskShouldCreateFileWhenRunWithMsBuild() { const string taskName = nameof(GenerateGitVersionInformation); @@ -77,8 +75,6 @@ public void GenerateGitVersionInformationTaskShouldCreateFileWhenRunWithMsBuild( } [Test] - [Category(NoNet48)] - [Category(NoMono)] public void GenerateGitVersionInformationTaskShouldCreateFileWhenRunWithMsBuildInBuildServer() { const string taskName = nameof(GenerateGitVersionInformation); diff --git a/src/GitVersion.MsBuild.Tests/Tasks/GetVersionTaskTests.cs b/src/GitVersion.MsBuild.Tests/Tasks/GetVersionTaskTests.cs index eefc8cd80e..aedebb5d73 100644 --- a/src/GitVersion.MsBuild.Tests/Tasks/GetVersionTaskTests.cs +++ b/src/GitVersion.MsBuild.Tests/Tasks/GetVersionTaskTests.cs @@ -61,8 +61,6 @@ public void GetVersionTaskShouldReturnVersionOutputVariablesForBuildServer() [TestCase(nameof(VersionVariables.Patch), "4")] [TestCase(nameof(VersionVariables.MajorMinorPatch), "1.2.4")] [TestCase(nameof(VersionVariables.FullSemVer), "1.2.4+1")] - [Category(NoNet48)] - [Category(NoMono)] public void GetVersionTaskShouldReturnVersionOutputVariablesWhenRunWithMsBuild(string outputProperty, string version) { const string taskName = nameof(GetVersion); @@ -82,8 +80,6 @@ public void GetVersionTaskShouldReturnVersionOutputVariablesWhenRunWithMsBuild(s [TestCase(nameof(VersionVariables.Patch), "1")] [TestCase(nameof(VersionVariables.MajorMinorPatch), "1.0.1")] [TestCase(nameof(VersionVariables.FullSemVer), "1.0.1+1")] - [Category(NoNet48)] - [Category(NoMono)] public void GetVersionTaskShouldReturnVersionOutputVariablesWhenRunWithMsBuildInBuildServer(string outputProperty, string version) { const string taskName = nameof(GetVersion); diff --git a/src/GitVersion.MsBuild.Tests/Tasks/UpdateAssemblyInfoTaskTest.cs b/src/GitVersion.MsBuild.Tests/Tasks/UpdateAssemblyInfoTaskTest.cs index e106b77d73..4b66459731 100644 --- a/src/GitVersion.MsBuild.Tests/Tasks/UpdateAssemblyInfoTaskTest.cs +++ b/src/GitVersion.MsBuild.Tests/Tasks/UpdateAssemblyInfoTaskTest.cs @@ -41,8 +41,6 @@ public void UpdateAssemblyInfoTaskShouldCreateFileInBuildServer() } [Test] - [Category(NoNet48)] - [Category(NoMono)] public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuild() { const string taskName = nameof(UpdateAssemblyInfo); @@ -64,8 +62,6 @@ public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuild() } [Test] - [Category(NoNet48)] - [Category(NoMono)] public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildInBuildServer() { const string taskName = nameof(UpdateAssemblyInfo); diff --git a/src/GitVersion.MsBuild.Tests/Tasks/WriteVersionInfoTest.cs b/src/GitVersion.MsBuild.Tests/Tasks/WriteVersionInfoTest.cs index 1b0c9687b2..11b3a8d4ed 100644 --- a/src/GitVersion.MsBuild.Tests/Tasks/WriteVersionInfoTest.cs +++ b/src/GitVersion.MsBuild.Tests/Tasks/WriteVersionInfoTest.cs @@ -93,8 +93,6 @@ public void WriteVersionInfoTaskShouldLogOutputVariablesToBuildOutputInGitHubAct } [Test] - [Category(NoNet48)] - [Category(NoMono)] public void WriteVersionInfoTaskShouldNotLogOutputVariablesToBuildOutputWhenRunWithMsBuild() { const string taskName = nameof(WriteVersionInfoToBuildLog); @@ -110,8 +108,6 @@ public void WriteVersionInfoTaskShouldNotLogOutputVariablesToBuildOutputWhenRunW } [Test] - [Category(NoNet48)] - [Category(NoMono)] public void WriteVersionInfoTaskShouldLogOutputVariablesToBuildOutputWhenRunWithMsBuildInAzurePipeline() { const string taskName = nameof(WriteVersionInfoToBuildLog); diff --git a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props index 266236f7fb..988679c33f 100644 --- a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props +++ b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props @@ -19,11 +19,6 @@ $(GitVersion_ToolArgments) -nocache - - "$(MSBuildThisFileDirectory)net48/gitversion.exe" - $(MSBuildThisFileDirectory)net48/GitVersion.MsBuild.dll - - dotnet --roll-forward Major "$(MSBuildThisFileDirectory)netcoreapp3.1/gitversion.dll" $(MSBuildThisFileDirectory)netcoreapp3.1/GitVersion.MsBuild.dll diff --git a/src/GitVersion.MsBuild/nuget-files.props b/src/GitVersion.MsBuild/nuget-files.props index 79c534bf75..445e868e0e 100644 --- a/src/GitVersion.MsBuild/nuget-files.props +++ b/src/GitVersion.MsBuild/nuget-files.props @@ -1,10 +1,8 @@ - ../GitVersion.App/bin/$(Configuration)/net48 ../GitVersion.App/bin/$(Configuration)/netcoreapp3.1/publish ../GitVersion.App/bin/$(Configuration)/net6.0/publish - tools/net48 tools/netcoreapp3.1 tools/net6.0 @@ -13,11 +11,9 @@ - - diff --git a/tests/integration/full/app.csproj b/tests/integration/full/app.csproj deleted file mode 100644 index 67a478fbf0..0000000000 --- a/tests/integration/full/app.csproj +++ /dev/null @@ -1,42 +0,0 @@ - - - - - Debug - AnyCPU - {C1765652-F8AE-4FFD-AFC8-72054A5A91B7} - v4.8 - 512 - true - true - - - AnyCPU - true - full - false - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - TRACE - prompt - 4 - - - - - - - - - - - - - -