|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Nikola Milosavljevic < [email protected]> |
| 3 | +Date: Wed, 31 May 2023 16:04:51 +0000 |
| 4 | +Subject: [PATCH] Target net8.0 for source-build |
| 5 | + |
| 6 | +Backport: https://github.com/NuGet/NuGet.Client/pull/5193 |
| 7 | +--- |
| 8 | + build/common.project.props | 8 ++++---- |
| 9 | + build/common.targets | 2 +- |
| 10 | + eng/source-build/global.json | 2 +- |
| 11 | + .../NuGet.Configuration/NuGet.Configuration.csproj | 2 +- |
| 12 | + .../NuGet.PackageManagement.csproj | 2 +- |
| 13 | + 5 files changed, 8 insertions(+), 8 deletions(-) |
| 14 | + |
| 15 | +diff --git a/build/common.project.props b/build/common.project.props |
| 16 | +index 0e32eb737..de8b07140 100644 |
| 17 | +--- a/build/common.project.props |
| 18 | ++++ b/build/common.project.props |
| 19 | +@@ -12,7 +12,7 @@ |
| 20 | + <NETFXTargetFrameworkVersion>v4.7.2</NETFXTargetFrameworkVersion> |
| 21 | + <NETFXTargetFramework>net472</NETFXTargetFramework> |
| 22 | + <NETCoreTargetFramework>netcoreapp3.1</NETCoreTargetFramework> |
| 23 | +- <NETCoreTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net7.0</NETCoreTargetFramework> |
| 24 | ++ <NETCoreTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net8.0</NETCoreTargetFramework> |
| 25 | + <NETCoreTestTargetFrameworks>net7.0</NETCoreTestTargetFrameworks> |
| 26 | + <NETCoreTestTargetFrameworks Condition=" ('$(CI)' == 'true' AND '$(BUILD_NET8)' != 'false') OR '$(BUILD_NET8)' == 'true' ">net7.0;net8.0</NETCoreTestTargetFrameworks> |
| 27 | + <NetStandardVersion>netstandard2.0</NetStandardVersion> |
| 28 | +@@ -20,14 +20,14 @@ |
| 29 | + <TargetFrameworksExe Condition="'$(IsXPlat)' == 'true'">$(NETCoreTargetFramework)</TargetFrameworksExe> |
| 30 | + <TargetFrameworksExeForSigning>$(TargetFrameworksExe);netcoreapp5.0</TargetFrameworksExeForSigning> |
| 31 | + <TargetFrameworksExeForSigning Condition=" '$(IsXPlat)' == 'true' ">$(NETCoreTargetFramework);netcoreapp5.0</TargetFrameworksExeForSigning> |
| 32 | +- <TargetFrameworksExeForSigning Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworksExe);net7.0</TargetFrameworksExeForSigning> |
| 33 | ++ <TargetFrameworksExeForSigning Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworksExe)</TargetFrameworksExeForSigning> |
| 34 | + <MinimalTargetFrameworksExeSigning>$(NETFXTargetFramework);netcoreapp5.0</MinimalTargetFrameworksExeSigning> |
| 35 | + <MinimalTargetFrameworksExeSigning Condition=" '$(IsXPlat)' == 'true' ">netcoreapp5.0</MinimalTargetFrameworksExeSigning> |
| 36 | +- <MinimalTargetFrameworksExeSigning Condition="'$(DotNetBuildFromSource)' == 'true'">net7.0</MinimalTargetFrameworksExeSigning> |
| 37 | ++ <MinimalTargetFrameworksExeSigning Condition="'$(DotNetBuildFromSource)' == 'true'">$(NETCoreTargetFramework)</MinimalTargetFrameworksExeSigning> |
| 38 | + <TargetFrameworksLibrary>$(NETFXTargetFramework);$(NetStandardVersion)</TargetFrameworksLibrary> |
| 39 | + <TargetFrameworksLibrary Condition="'$(DotNetBuildFromSource)' == 'true'">$(NETCoreTargetFramework);$(NetStandardVersion)</TargetFrameworksLibrary> |
| 40 | + <TargetFrameworksLibraryForSigning>$(TargetFrameworksLibrary);netcoreapp5.0</TargetFrameworksLibraryForSigning> |
| 41 | +- <TargetFrameworksLibraryForSigning Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworksLibrary);net7.0</TargetFrameworksLibraryForSigning> |
| 42 | ++ <TargetFrameworksLibraryForSigning Condition="'$(DotNetBuildFromSource)' == 'true'">$(TargetFrameworksLibrary)</TargetFrameworksLibraryForSigning> |
| 43 | + <TargetFrameworksLibraryForCrossVerificationTests>$(NETFXTargetFramework);$(NETCoreTestTargetFrameworks)</TargetFrameworksLibraryForCrossVerificationTests> |
| 44 | + <RepositoryRootDirectory>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\</RepositoryRootDirectory> |
| 45 | + <BuildCommonDirectory>$(RepositoryRootDirectory)build\</BuildCommonDirectory> |
| 46 | +diff --git a/build/common.targets b/build/common.targets |
| 47 | +index 51b38ba04..dc53d7557 100644 |
| 48 | +--- a/build/common.targets |
| 49 | ++++ b/build/common.targets |
| 50 | +@@ -6,7 +6,7 @@ |
| 51 | + <IsDesktop>true</IsDesktop> |
| 52 | + </PropertyGroup> |
| 53 | + |
| 54 | +- <PropertyGroup Condition=" $(TargetFramework.StartsWith('netcoreapp')) OR $(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('net6')) OR $(TargetFramework.StartsWith('net7')) "> |
| 55 | ++ <PropertyGroup Condition=" $(TargetFramework.StartsWith('netcoreapp')) OR $(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('net6')) OR $(TargetFramework.StartsWith('net7')) OR $(TargetFramework.StartsWith('net8')) "> |
| 56 | + <DefineConstants>$(DefineConstants);IS_CORECLR</DefineConstants> |
| 57 | + <IsCore>true</IsCore> |
| 58 | + </PropertyGroup> |
| 59 | +diff --git a/eng/source-build/global.json b/eng/source-build/global.json |
| 60 | +index ba3ce2cfc..43d452859 100644 |
| 61 | +--- a/eng/source-build/global.json |
| 62 | ++++ b/eng/source-build/global.json |
| 63 | +@@ -1,6 +1,6 @@ |
| 64 | + { |
| 65 | + "tools": { |
| 66 | +- "dotnet": "7.0.100" |
| 67 | ++ "dotnet": "8.0.100-preview.3.23178.7" |
| 68 | + }, |
| 69 | + "msbuild-sdks": { |
| 70 | + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21309.7" |
| 71 | +diff --git a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj |
| 72 | +index a246feeb9..eea152eb6 100644 |
| 73 | +--- a/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj |
| 74 | ++++ b/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj |
| 75 | +@@ -26,7 +26,7 @@ |
| 76 | + <Reference Include="System.Xml.Linq" /> |
| 77 | + </ItemGroup> |
| 78 | + |
| 79 | +- <ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardVersion)' or '$(TargetFramework)' == 'net7.0' "> |
| 80 | ++ <ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardVersion)' or '$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net8.0' "> |
| 81 | + <PackageReference Include="System.Security.Cryptography.ProtectedData" /> |
| 82 | + </ItemGroup> |
| 83 | + |
| 84 | +diff --git a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj |
| 85 | +index be1727a5b..38658b221 100644 |
| 86 | +--- a/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj |
| 87 | ++++ b/src/NuGet.Core/NuGet.PackageManagement/NuGet.PackageManagement.csproj |
| 88 | +@@ -32,7 +32,7 @@ |
| 89 | + <Reference Include="System.Net.Http" /> |
| 90 | + </ItemGroup> |
| 91 | + |
| 92 | +- <ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardVersion)' or '$(TargetFramework)' == 'net7.0' "> |
| 93 | ++ <ItemGroup Condition=" '$(TargetFramework)' == '$(NetStandardVersion)' or '$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net8.0' "> |
| 94 | + <PackageReference Include="System.ComponentModel.Composition" /> |
| 95 | + </ItemGroup> |
| 96 | + |
0 commit comments