From e70957e005b0e1bfd7c5db01b9a5ec26f5e51d5a Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Sat, 15 Apr 2023 16:11:49 +0200 Subject: [PATCH] Upgrade to net6.0 and remove unused dependencies 1. Upgrade netcoreapp3.1 to net6.0 as the former is out-of-support and not supported by MSBuild/17.3.2 2. Remove unused package versions 3. Upgrade System.Text.Json to the latest available version (in SBRP and nuget.org) 7.0.2. 4. Directly reference NETStandard.Library/2.0.3 in test projects to upgrade the transitive NETStandard.Library/1.6.1 version (which comes from xunit) as 1.6.1 is vulnerable and raises CG warnings. --- eng/Versions.props | 14 +++++++------- src/Directory.Build.targets | 7 ++++++- .../Microsoft.Build.StandardCI.csproj | 2 +- .../Microsoft.Build.Tasks.Git.UnitTests.csproj | 10 ++++------ .../Microsoft.Build.Tasks.Git.csproj | 2 +- ...crosoft.SourceLink.AzureDevOpsServer.Git.csproj | 2 +- .../Microsoft.SourceLink.AzureRepos.Git.csproj | 2 +- .../Microsoft.SourceLink.Bitbucket.Git.csproj | 2 +- .../Microsoft.SourceLink.Common.csproj | 2 +- .../Microsoft.SourceLink.GitHub.csproj | 2 +- .../Microsoft.SourceLink.GitLab.csproj | 2 +- .../Microsoft.SourceLink.GitWeb.csproj | 2 +- .../Microsoft.SourceLink.Gitea.csproj | 2 +- .../Microsoft.SourceLink.Gitee.csproj | 2 +- src/TestUtilities/TestUtilities.csproj | 4 ++++ src/dotnet-sourcelink/dotnet-sourcelink.csproj | 4 ++-- 16 files changed, 34 insertions(+), 27 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index b62cfbb5..ef1b7304 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -6,20 +6,20 @@ 8.0.0 beta - true true - 16.7.0 - 16.7.0 + 17.3.2 + 17.3.2 + + + 17.5.0 + 19.210.0-preview - 3.1.6 5.7.0 5.7.0 2.0.0-beta4.22272.1 2.0.0-beta4.22272.1 0.4.0-alpha.22272.1 - 1.8.1 - 4.5.0 - 4.7.2 + 7.0.2 1.5.25 0.27.0-preview-0119 diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 8f9ad215..e12bc5d9 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -3,10 +3,15 @@ + + + + + - + - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) true true true diff --git a/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj b/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj index b712e630..8fccc83a 100644 --- a/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj +++ b/src/Microsoft.Build.Tasks.Git.UnitTests/Microsoft.Build.Tasks.Git.UnitTests.csproj @@ -1,14 +1,12 @@ - - - + + net472;$(NetCurrent) + - - - + diff --git a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj index 90d2dcfc..5336efb1 100644 --- a/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj +++ b/src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj index 8bb934b2..36758147 100644 --- a/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj +++ b/src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj index b943b9b8..827dbc30 100644 --- a/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj +++ b/src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj index 12e66df7..dc825042 100644 --- a/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj +++ b/src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj index 759d4aad..7315d7f2 100644 --- a/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj +++ b/src/SourceLink.Common/Microsoft.SourceLink.Common.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj index ffc434d7..69356568 100644 --- a/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj +++ b/src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj index bd2eacbc..e9b487f2 100644 --- a/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj +++ b/src/SourceLink.GitLab/Microsoft.SourceLink.GitLab.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj index 53200604..37e23f35 100644 --- a/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj +++ b/src/SourceLink.GitWeb/Microsoft.SourceLink.GitWeb.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj index cecf90ee..8c4dcea4 100644 --- a/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj +++ b/src/SourceLink.Gitea/Microsoft.SourceLink.Gitea.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj b/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj index dbf6ca11..86a98b2a 100644 --- a/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj +++ b/src/SourceLink.Gitee/Microsoft.SourceLink.Gitee.csproj @@ -2,7 +2,7 @@ - net472;netcoreapp3.1;$(NetCurrent) + net472;$(NetMinimum);$(NetCurrent) $(NetCurrent) true diff --git a/src/TestUtilities/TestUtilities.csproj b/src/TestUtilities/TestUtilities.csproj index 6196a790..ff309789 100644 --- a/src/TestUtilities/TestUtilities.csproj +++ b/src/TestUtilities/TestUtilities.csproj @@ -5,7 +5,9 @@ net472;$(NetCurrent) false true + false + @@ -13,6 +15,8 @@ + + diff --git a/src/dotnet-sourcelink/dotnet-sourcelink.csproj b/src/dotnet-sourcelink/dotnet-sourcelink.csproj index f2a6e7a0..7d150b07 100644 --- a/src/dotnet-sourcelink/dotnet-sourcelink.csproj +++ b/src/dotnet-sourcelink/dotnet-sourcelink.csproj @@ -11,12 +11,12 @@ true win-x64;win-x86;osx-x64 + - - +