Skip to content

Commit cb88284

Browse files
authored
Merge pull request #2178 from crummel/razorOmnisharpDll
Omnisharp Razor DLL fix
2 parents be80e53 + 7e7abb0 commit cb88284

File tree

4 files changed

+161
-40
lines changed

4 files changed

+161
-40
lines changed

patches/aspnetcore/0010-Don-t-build-for-full-fx.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+

patches/runtime/0033-Build-net4-in-source-build.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ index 7a3946c28a4..dfe161d6d72 100644
4646
- <AdditionalBuildTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true' and '$(BuildAllProjects)' == 'true'">$(AdditionalBuildTargetFrameworks);netstandard2.0</AdditionalBuildTargetFrameworks>
4747
+ <NETFrameworkTargetFrameworksExcept48>net45;net451;net452;net46;net461;net462;net47;net471;net472</NETFrameworkTargetFrameworksExcept48>
4848
+ <AdditionalBuildTargetFrameworks Condition="'$(BuildTargetFramework)' == 'net48'">$(AdditionalBuildTargetFrameworks);$(NETFrameworkTargetFrameworksExcept48)</AdditionalBuildTargetFrameworks>
49-
+ <AdditionalBuildTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true' and '$(BuildAllProjects)' == 'true'">$(AdditionalBuildTargetFrameworks);netstandard2.0;net48;$(NETFrameworkTargetFrameworksExcept48)</AdditionalBuildTargetFrameworks>
49+
+ <AdditionalBuildTargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true' and '$(BuildAllProjects)' == 'true'">$(AdditionalBuildTargetFrameworks);netstandard2.0;net46;net48;$(NETFrameworkTargetFrameworksExcept48)</AdditionalBuildTargetFrameworks>
5050
<BuildSettings>$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)</BuildSettings>
5151
<BuildSettings Condition="'$(BuildTargetFramework)' == ''">$(NetCoreAppCurrent)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)</BuildSettings>
5252
</PropertyGroup>
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
From 9935154174cbf8b87c628a3ca67add3b490aafd6 Mon Sep 17 00:00:00 2001
2+
From: Chris Rummel <crummel@microsoft.com>
3+
Date: Fri, 21 May 2021 15:09:18 -0500
4+
Subject: [PATCH 30/30] Add net46 for some packages to support Omnisharp.
5+
6+
These packages are used in the AspNetCore build to produce MS.NET.SDK.Razor. Omnisharp hardcodes a net46 fx so we need to build that specifically.
7+
8+
---
9+
.../pkg/System.Resources.Extensions.pkgproj | 4 ++--
10+
.../ref/System.Resources.Extensions.csproj | 4 ++--
11+
.../src/System.Resources.Extensions.csproj | 2 +-
12+
.../tests/System.Resources.Extensions.Tests.csproj | 4 ++--
13+
4 files changed, 7 insertions(+), 7 deletions(-)
14+
15+
diff --git a/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj b/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj
16+
index 3ac0955a841..9849ef91669 100644
17+
--- a/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj
18+
+++ b/src/libraries/System.Resources.Extensions/pkg/System.Resources.Extensions.pkgproj
19+
@@ -2,8 +2,8 @@
20+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
21+
<ItemGroup>
22+
<ProjectReference Include="..\src\System.Resources.Extensions.csproj">
23+
- <SupportedFramework>uap10.0.16299;net461;netcoreapp2.0;$(AllXamarinFrameworks)</SupportedFramework>
24+
+ <SupportedFramework>uap10.0.16299;net46;net461;netcoreapp2.0;$(AllXamarinFrameworks)</SupportedFramework>
25+
</ProjectReference>
26+
</ItemGroup>
27+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
28+
-</Project>
29+
\ No newline at end of file
30+
+</Project>
31+
diff --git a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
32+
index 184133af2fa..c6eff5cf92c 100644
33+
--- a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
34+
+++ b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj
35+
@@ -1,9 +1,9 @@
36+
<Project Sdk="Microsoft.NET.Sdk">
37+
<PropertyGroup>
38+
- <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
39+
+ <TargetFrameworks>netstandard2.0;net46;net461</TargetFrameworks>
40+
<Nullable>enable</Nullable>
41+
</PropertyGroup>
42+
<ItemGroup>
43+
<Compile Include="System.Resources.Extensions.cs" />
44+
</ItemGroup>
45+
-</Project>
46+
\ No newline at end of file
47+
+</Project>
48+
diff --git a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
49+
index f9d521b2354..da9b1641565 100644
50+
--- a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
51+
+++ b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
52+
@@ -1,7 +1,7 @@
53+
<Project Sdk="Microsoft.NET.Sdk">
54+
<PropertyGroup>
55+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
56+
- <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
57+
+ <TargetFrameworks>netstandard2.0;net46;net461</TargetFrameworks>
58+
<DefineConstants>$(DefineConstants);RESOURCES_EXTENSIONS</DefineConstants>
59+
<Nullable>enable</Nullable>
60+
</PropertyGroup>
61+
diff --git a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj
62+
index b48848c7a45..b310496f4bc 100644
63+
--- a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj
64+
+++ b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj
65+
@@ -1,6 +1,6 @@
66+
<Project Sdk="Microsoft.NET.Sdk">
67+
<PropertyGroup>
68+
- <TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;net461</TargetFrameworks>
69+
+ <TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;net461;net46</TargetFrameworks>
70+
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
71+
</PropertyGroup>
72+
<ItemGroup>
73+
@@ -44,4 +44,4 @@
74+
</ItemGroup>
75+
<Exec Command="%(ExecuteMethod.Command)" WorkingDirectory="$(TargetDir)" />
76+
</Target>
77+
-</Project>
78+
\ No newline at end of file
79+
+</Project>
80+
--
81+
2.18.0
82+

0 commit comments

Comments
 (0)