Skip to content

Commit 228289b

Browse files
committed
Fixes for HttpUtility.UrlEncode for Unity aot and jit profiles
Reverting HttpUtility.UrlEncode back to the System.dll to keep netstandard profiles smaller, especially on Android. In Unity integration testing we found that adding System.Web to netstandard profile brings in 4 dlls to Android APKs that were not there before. This attempt is to leave HttpUtility in System.dll and use a type forward in System.Web to satisfy .net 4 profile references.
1 parent d3fa05c commit 228289b

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

mcs/class/Facades/netstandard/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
2323
ifeq ($(PROFILE),xammac_net_4_5)
2424
LIB_REFS += System.Web.Services
2525
else ifeq (2.1, $(FRAMEWORK_VERSION))
26-
ifeq ($(PROFILE),unityaot)
27-
LIB_REFS += System.Web
28-
else
26+
ifneq ($(PROFILE),unityaot)
2927
LIB_REFS += System.Web.Services
3028
endif
3129
else

mcs/class/System.Web/Assembly/AssemblyInfo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,8 @@
139139
[assembly: WebResource ("webform.js", "text/javascript")]
140140
[assembly: WebResource ("WebUIValidation_2.0.js", "text/javascript")]
141141
#endif
142+
143+
#if UNITY_AOT && FULL_AOT_RUNTIME
144+
[assembly: TypeForwardedTo (typeof (System.Web.HttpUtility))]
145+
[assembly: TypeForwardedTo (typeof (System.Web.Util.HttpEncoder))]
146+
#endif

mcs/class/System.Web/unityaot_System.Web.dll.sources

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@ Assembly/AssemblyInfo.cs
33
../../build/common/Locale.cs
44
../../build/common/MonoTODOAttribute.cs
55
../System/System/MonoToolsLocator.cs
6-
7-
System.Web/HttpUtility.cs
8-
System.Web.Util/Helpers.cs
9-
System.Web.Util/HttpEncoder.cs

mcs/class/System/unityaot_System.dll.sources

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#include mobile_System.dll.sources
2+
../System.Web/System.Web/HttpUtility.cs
3+
../System.Web/System.Web.Util/Helpers.cs
4+
../System.Web/System.Web.Util/HttpEncoder.cs
25
System.CodeDom/CodeCompileUnit.cs
36
System.CodeDom/CodeTypeDeclaration.cs
47

0 commit comments

Comments
 (0)