Skip to content

Commit 87da2ff

Browse files
authored
Upgrade to net6.0 and remove unused dependencies (#1001)
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.
1 parent 40a5327 commit 87da2ff

File tree

16 files changed

+34
-27
lines changed

16 files changed

+34
-27
lines changed

eng/Versions.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
<VersionPrefix>8.0.0</VersionPrefix>
77
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
88
<!-- Opt-in repo features -->
9-
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
109
<UsingToolSymbolUploader>true</UsingToolSymbolUploader>
11-
<MicrosoftBuildVersion>16.7.0</MicrosoftBuildVersion>
12-
<MicrosoftBuildTasksCore>16.7.0</MicrosoftBuildTasksCore>
10+
<MicrosoftBuildVersion>17.3.2</MicrosoftBuildVersion>
11+
<MicrosoftBuildTasksCore>17.3.2</MicrosoftBuildTasksCore>
12+
13+
<!-- TODO: Remove after https://github.com/dotnet/arcade/pull/13178 is consumed. -->
14+
<MicrosoftNETTestSdkVersion>17.5.0</MicrosoftNETTestSdkVersion>
15+
1316
<MicrosoftTeamFoundationServerExtendedClientVersion>19.210.0-preview</MicrosoftTeamFoundationServerExtendedClientVersion>
14-
<MicrosoftDotNetPlatformAbstractionsVersion>3.1.6</MicrosoftDotNetPlatformAbstractionsVersion>
1517
<NuGetVersioningVersion>5.7.0</NuGetVersioningVersion>
1618
<NuGetPackagingVersion>5.7.0</NuGetPackagingVersion>
1719
<SystemCommandLineVersion>2.0.0-beta4.22272.1</SystemCommandLineVersion>
1820
<SystemCommandLineNamingConventionBinderVersion>2.0.0-beta4.22272.1</SystemCommandLineNamingConventionBinderVersion>
1921
<SystemCommandLineRenderingVersion>0.4.0-alpha.22272.1</SystemCommandLineRenderingVersion>
20-
<SystemReflectionMetadataVersion>1.8.1</SystemReflectionMetadataVersion>
21-
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
22-
<SystemTextJsonVersion>4.7.2</SystemTextJsonVersion>
22+
<SystemTextJsonVersion>7.0.2</SystemTextJsonVersion>
2323
<XunitCombinatorialVersion>1.5.25</XunitCombinatorialVersion>
2424
<!-- libgit2 used for integration tests -->
2525
<LibGit2SharpVersion>0.27.0-preview-0119</LibGit2SharpVersion>

src/Directory.Build.targets

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
<Project>
44
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
55

6+
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
7+
<!-- Upgrade the NETStandard.Library transitive xunit dependency to avoid transitive 1.x NS dependencies. -->
8+
<PackageReference Include="NETStandard.Library" Version="2.0.3" Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'" />
9+
</ItemGroup>
10+
611
<ItemGroup>
712
<NuspecProperty Include="DesktopTfm=net472"/>
813
<NuspecProperty Include="CoreTfm=$(NetCurrent)" Condition="'$(DotNetBuildFromSource)' == 'true'"/>
9-
<NuspecProperty Include="CoreTfm=netcoreapp3.1" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
14+
<NuspecProperty Include="CoreTfm=$(NetMinimum)" Condition="'$(DotNetBuildFromSource)' != 'true'"/>
1015
</ItemGroup>
1116

1217
<!--

src/Microsoft.Build.StandardCI/Microsoft.Build.StandardCI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp3.1;$(NetCurrent)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(NetMinimum);$(NetCurrent)</TargetFrameworks>
66
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
77
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
88
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
3-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
54
<TargetFrameworks>net472;$(NetCurrent)</TargetFrameworks>
65
</PropertyGroup>
6+
77
<ItemGroup>
88
<ProjectReference Include="..\Microsoft.Build.Tasks.Git\Microsoft.Build.Tasks.Git.csproj" />
99
<ProjectReference Include="..\TestUtilities\TestUtilities.csproj" />
1010
</ItemGroup>
11-
<ItemGroup>
12-
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'" />
13-
</ItemGroup>
11+
1412
</Project>

src/Microsoft.Build.Tasks.Git/Microsoft.Build.Tasks.Git.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp3.1;$(NetCurrent)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(NetMinimum);$(NetCurrent)</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(NetCurrent)</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.AzureDevOpsServer.Git/Microsoft.SourceLink.AzureDevOpsServer.Git.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp3.1;$(NetCurrent)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(NetMinimum);$(NetCurrent)</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(NetCurrent)</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.AzureRepos.Git/Microsoft.SourceLink.AzureRepos.Git.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp3.1;$(NetCurrent)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(NetMinimum);$(NetCurrent)</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(NetCurrent)</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.Bitbucket.Git/Microsoft.SourceLink.Bitbucket.Git.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp3.1;$(NetCurrent)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(NetMinimum);$(NetCurrent)</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(NetCurrent)</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.Common/Microsoft.SourceLink.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp3.1;$(NetCurrent)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(NetMinimum);$(NetCurrent)</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(NetCurrent)</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

src/SourceLink.GitHub/Microsoft.SourceLink.GitHub.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the License.txt file in the project root for more information. -->
33
<Project Sdk="Microsoft.NET.Sdk">
44
<PropertyGroup>
5-
<TargetFrameworks>net472;netcoreapp3.1;$(NetCurrent)</TargetFrameworks>
5+
<TargetFrameworks>net472;$(NetMinimum);$(NetCurrent)</TargetFrameworks>
66
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(NetCurrent)</TargetFrameworks>
77
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
88

0 commit comments

Comments
 (0)