Merge pull request #12501 from crummel/nugetFullfx

Add patch to build net472 in NuGet to support Omnisharp.
This commit is contained in:
Michael Simons 2021-10-25 13:18:22 -05:00 committed by GitHub
commit 377904ab62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 20 deletions

View file

@ -0,0 +1,43 @@
From 7f35d623761748721496abcbae2d6f11d4cf1ca8 Mon Sep 17 00:00:00 2001
From: Chris Rummel <crummel@microsoft.com>
Date: Fri, 22 Oct 2021 21:12:51 -0500
Subject: [PATCH] Re-enable fullfx TFM in NuGet.
---
build/common.project.props | 3 +--
.../NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/build/common.project.props b/build/common.project.props
index 000702f58..b29968eaf 100644
--- a/build/common.project.props
+++ b/build/common.project.props
@@ -18,11 +18,10 @@
<IsBuildOnlyXPLATProjects>$(DotNetBuildFromSource)</IsBuildOnlyXPLATProjects>
<NetStandardVersion>netstandard2.0;net6.0</NetStandardVersion>
<TargetFrameworksExe>$(NETFXTargetFramework);$(NETCoreTargetFramework)</TargetFrameworksExe>
- <TargetFrameworksExe Condition="'$(IsBuildOnlyXPLATProjects)' == 'true' OR '$(IsXPlat)' == 'true'">$(NETCoreTargetFramework)</TargetFrameworksExe>
+ <TargetFrameworksExe Condition="'$(IsXPlat)' == 'true'">$(NETCoreTargetFramework)</TargetFrameworksExe>
<TargetFrameworksExeForSigning>$(TargetFrameworksExe);net6.0</TargetFrameworksExeForSigning>
<TargetFrameworksExeForSigning Condition=" '$(IsXPlat)' == 'true' ">$(NETCoreTargetFramework);net6.0</TargetFrameworksExeForSigning>
<TargetFrameworksLibrary>$(NETFXTargetFramework);$(NetStandardVersion)</TargetFrameworksLibrary>
- <TargetFrameworksLibrary Condition="'$(IsBuildOnlyXPLATProjects)' == 'true'">$(NetStandardVersion)</TargetFrameworksLibrary>
<TargetFrameworksLibraryForSigning>$(TargetFrameworksLibrary);net6.0</TargetFrameworksLibraryForSigning>
<TargetFrameworksLibraryForCrossVerificationTests>$(NETFXTargetFramework);netcoreapp5.0</TargetFrameworksLibraryForCrossVerificationTests>
<RepositoryRootDirectory>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\</RepositoryRootDirectory>
diff --git a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
index f4d083e52..c4eb79b4c 100644
--- a/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
+++ b/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.csproj
@@ -176,7 +176,7 @@
<PropertyGroup>
<!-- Build from source can't use ILMerge. -->
<ILMergeSubpath Condition="'$(IsBuildOnlyXPLATProjects)' != 'true'">ilmerge\</ILMergeSubpath>
- <PackagePathDir Condition="'$(TargetFramework)' == '$(NETFXTargetFramework)' AND '$(IsBuildOnlyXPLATProjects)' != 'true'">Desktop/</PackagePathDir>
+ <PackagePathDir Condition="'$(TargetFramework)' == '$(NETFXTargetFramework)'">Desktop/</PackagePathDir>
<PackagePathDir Condition="'$(TargetFramework)' == 'netstandard2.0'">CoreCLR/</PackagePathDir>
</PropertyGroup>
<ItemGroup>
--
2.31.1

View file

@ -1,4 +1,4 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 3540e85a194dda1e5448e0aab3212c8aeb5a1aff Mon Sep 17 00:00:00 2001
From: Eric Erhardt <eric.erhardt@microsoft.com>
Date: Fri, 22 Oct 2021 20:48:25 +0000
Subject: [PATCH] Build Microsoft.NET.Build.Tasks for netfx
@ -7,11 +7,11 @@ Required for omnisharp to work with a source-built .NET SDK.
Patch removal issue: https://github.com/dotnet/sdk/issues/22281
---
.../Microsoft.DotNet.Compatibility.csproj | 1 -
.../Microsoft.DotNet.PackageValidation.csproj | 7 ++++++-
.../Microsoft.NET.Build.Extensions.Tasks.csproj | 1 -
.../Microsoft.NET.Build.Tasks.csproj | 1 -
4 files changed, 6 insertions(+), 4 deletions(-)
.../Microsoft.DotNet.Compatibility.csproj | 1 -
.../Microsoft.DotNet.PackageValidation.csproj | 1 -
.../Microsoft.NET.Build.Extensions.Tasks.csproj | 1 -
.../Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj | 1 -
4 files changed, 4 deletions(-)
diff --git a/src/Compatibility/Microsoft.DotNet.Compatibility/Microsoft.DotNet.Compatibility.csproj b/src/Compatibility/Microsoft.DotNet.Compatibility/Microsoft.DotNet.Compatibility.csproj
index 92624be845..f9f8e46329 100644
@ -26,7 +26,7 @@ index 92624be845..f9f8e46329 100644
<IsShippingPackage>true</IsShippingPackage>
<StrongNameKeyId>Open</StrongNameKeyId>
diff --git a/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj b/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj
index 7a8b648652..4f820adb72 100644
index 7a8b648652..4241f4577e 100644
--- a/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj
+++ b/src/Compatibility/Microsoft.DotNet.PackageValidation/Microsoft.DotNet.PackageValidation.csproj
@@ -2,7 +2,6 @@
@ -37,19 +37,6 @@ index 7a8b648652..4f820adb72 100644
<StrongNameKeyId>Open</StrongNameKeyId>
</PropertyGroup>
@@ -15,6 +14,12 @@
<ProjectReference Include="..\Microsoft.DotNet.ApiCompatibility\Microsoft.DotNet.ApiCompatibility.csproj" />
</ItemGroup>
+ <!-- This is working around a source-build issue with NuGet. Since NuGet isn't building for netfx in source-build, this reference isn't getting set automatically -->
+ <!-- This can be removed once NuGet builds for netfx in source-build. -->
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
+ <Reference Include="System.IO.Compression" />
+ </ItemGroup>
+
<ItemGroup>
<EmbeddedResource Update="Resources.resx" GenerateSource="true" />
</ItemGroup>
diff --git a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj
index 13ada82225..280fbdc83e 100644
--- a/src/Tasks/Microsoft.NET.Build.Extensions.Tasks/Microsoft.NET.Build.Extensions.Tasks.csproj
@ -74,3 +61,6 @@ index 604ef43bf2..bce39c67d4 100644
<Nullable>annotations</Nullable>
</PropertyGroup>
--
2.31.1