|
| 1 | +From 9b33580763b2891002fcd1e53ec3101b3f381fca Mon Sep 17 00:00:00 2001 |
| 2 | +From: Chris Rummel <crummel@microsoft.com> |
| 3 | +Date: Fri, 21 May 2021 02:36:31 -0500 |
| 4 | +Subject: [PATCH 5/5] Re-enable full fx builds in source-build. |
| 5 | + |
| 6 | +This also adds the net46 framework to support AspNetCore building a |
| 7 | +net46 version of Microsoft.NET.Sdk.Razor.dll, which is required to |
| 8 | +support Omnisharp in VSCode. |
| 9 | + |
| 10 | +--- |
| 11 | + Directory.Build.props | 2 +- |
| 12 | + eng/Packages.props | 1 + |
| 13 | + src/Directory.Build.props | 3 +-- |
| 14 | + src/Utilities/Microsoft.Build.Utilities.csproj | 4 ++++ |
| 15 | + 4 files changed, 7 insertions(+), 3 deletions(-) |
| 16 | + |
| 17 | +diff --git a/Directory.Build.props b/Directory.Build.props |
| 18 | +index 1683a4c9..4e62284c 100644 |
| 19 | +--- a/Directory.Build.props |
| 20 | ++++ b/Directory.Build.props |
| 21 | +@@ -13,7 +13,7 @@ |
| 22 | + </PropertyGroup> |
| 23 | + |
| 24 | + <PropertyGroup> |
| 25 | +- <FullFrameworkTFM>net472</FullFrameworkTFM> |
| 26 | ++ <FullFrameworkTFM>net472;net46</FullFrameworkTFM> |
| 27 | + </PropertyGroup> |
| 28 | + |
| 29 | + <PropertyGroup> |
| 30 | +diff --git a/eng/Packages.props b/eng/Packages.props |
| 31 | +index 6b716285..c38ee030 100644 |
| 32 | +--- a/eng/Packages.props |
| 33 | ++++ b/eng/Packages.props |
| 34 | +@@ -40,6 +40,7 @@ |
| 35 | + <PackageReference Update="System.Text.Json" Version="4.7.0" /> |
| 36 | + <PackageReference Update="System.Threading.Tasks.Dataflow" Version="4.9.0" /> |
| 37 | + <PackageReference Update="System.Threading.Thread" Version="4.0.0" /> |
| 38 | ++ <PackageReference Update="System.ValueTuple" Version="4.5.0" /> |
| 39 | + <PackageReference Update="System.Xml.XPath" Version="4.3.0" /> |
| 40 | + <PackageReference Update="xunit.assert" Version="$(XUnitVersion)" /> |
| 41 | + <PackageReference Update="xunit.console" Version="$(XUnitVersion)" /> |
| 42 | +diff --git a/src/Directory.Build.props b/src/Directory.Build.props |
| 43 | +index 54b620c6..0100afd5 100644 |
| 44 | +--- a/src/Directory.Build.props |
| 45 | ++++ b/src/Directory.Build.props |
| 46 | +@@ -27,13 +27,12 @@ |
| 47 | + |
| 48 | + <!-- Defaults for target frameworks and architecture --> |
| 49 | + <LibraryTargetFrameworks>$(FullFrameworkTFM);netstandard2.0</LibraryTargetFrameworks> |
| 50 | +- <LibraryTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">netstandard2.0</LibraryTargetFrameworks> |
| 51 | + <LibraryTargetFrameworks Condition="'$(MonoBuild)'=='true'">$(FullFrameworkTFM)</LibraryTargetFrameworks> |
| 52 | + <PlatformTarget>AnyCPU</PlatformTarget> |
| 53 | + |
| 54 | + <!-- Target frameworks for Exe and unit test projects (ie projects with runtime output) --> |
| 55 | + <RuntimeOutputTargetFrameworks>netcoreapp2.1</RuntimeOutputTargetFrameworks> |
| 56 | +- <RuntimeOutputTargetFrameworks Condition="'$(OsEnvironment)'=='windows' and '$(DotNetBuildFromSource)' != 'true'">$(FullFrameworkTFM);$(RuntimeOutputTargetFrameworks)</RuntimeOutputTargetFrameworks> |
| 57 | ++ <RuntimeOutputTargetFrameworks Condition="'$(OsEnvironment)'=='windows'">$(FullFrameworkTFM);$(RuntimeOutputTargetFrameworks)</RuntimeOutputTargetFrameworks> |
| 58 | + <RuntimeOutputTargetFrameworks Condition="'$(MonoBuild)' == 'true'">$(FullFrameworkTFM)</RuntimeOutputTargetFrameworks> |
| 59 | + |
| 60 | + <!-- Don't automatically append target framework to output path, since we want to put the Platform Target beforehand, if it's not AnyCPU --> |
| 61 | +diff --git a/src/Utilities/Microsoft.Build.Utilities.csproj b/src/Utilities/Microsoft.Build.Utilities.csproj |
| 62 | +index 840d2bcc..78f84687 100644 |
| 63 | +--- a/src/Utilities/Microsoft.Build.Utilities.csproj |
| 64 | ++++ b/src/Utilities/Microsoft.Build.Utilities.csproj |
| 65 | +@@ -39,6 +39,10 @@ |
| 66 | + <PackageReference Include="Microsoft.Win32.Registry" /> |
| 67 | + </ItemGroup> |
| 68 | + |
| 69 | ++ <ItemGroup Condition="'$(TargetFramework)' == 'net46'"> |
| 70 | ++ <PackageReference Include="System.ValueTuple" /> |
| 71 | ++ </ItemGroup> |
| 72 | ++ |
| 73 | + <ItemGroup Label="Shared Code"> |
| 74 | + <Compile Include="..\Shared\AssemblyFolders\AssemblyFoldersEx.cs"> |
| 75 | + <Link>Shared\AssemblyFolders\AssemblyFoldersEx.cs</Link> |
| 76 | +-- |
| 77 | +2.18.0 |
| 78 | + |
0 commit comments