Skip to content

Commit 9e3dc14

Browse files
authored
Improve "Build net4* in source-build" patch doc (#1951)
1 parent be50c2b commit 9e3dc14

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,20 @@ From: Davis Goodin <[email protected]>
33
Date: Wed, 9 Dec 2020 14:01:09 -0600
44
Subject: [PATCH] Build net4* in source-build
55

6-
Remove some ref/[...].csproj ProjectReferences to avoid build errors
7-
like these:
6+
Build net4XX TFMs to support OmniSharp. OmniSharp uses Mono, which needs to be
7+
able to find net4XX binaries. See https://github.com/OmniSharp/omnisharp-roslyn/issues/1973
8+
9+
This patch moves the list of all net4XX TFMs (except net48) that was already
10+
present in dotnet/runtime into a property called
11+
"NETFrameworkTargetFrameworksExcept48". The list is missing net48 because
12+
dotnet/runtime uses this list to automatically build non-net48 TFMs when the dev
13+
specifies net48. Source-build reuses this variable to build all the net4XX TFMs
14+
for source-build. (net48 is added individually to fill the gap.) If this patch
15+
hits a conflict due to the list of TFMs changing, make sure that every net4XX
16+
TFM ends up in AdditionalBuildTargetFrameworks during source-build.
17+
18+
The patch also removes some ref/[...].csproj ProjectReferences to avoid build
19+
errors like these:
820

921
/work/artifacts/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs(1383,140):
1022
error CS0433: The type 'PermissionSet' exists in both 'System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' [/work/artifacts/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.csproj]
@@ -14,6 +26,7 @@ like these:
1426
/work/artifacts/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs(39,43):
1527
error CS0433: The type 'EventLog' exists in both 'System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' [/work/artifacts/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.csproj]
1628
/work/.dotnet/sdk/5.0.100-rc.1.20452.10/Microsoft.Common.CrossTargeting.targets(88,5): error MSB4181: The "MSBuild" task returned false but did not log an error. [/work/artifacts/src/runtime.cf258a14b70ad9069470a108f13765e0e5988f51/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.csproj]
29+
1730
---
1831
src/libraries/Directory.Build.props | 5 +++--
1932
.../src/Microsoft.Extensions.Configuration.Xml.csproj | 3 +++

0 commit comments

Comments
 (0)