diff options
author | Egor Bogatov <egorbo@gmail.com> | 2019-03-11 15:23:31 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-03-11 15:23:31 +0300 |
commit | d0013e438c6ba81f9b58cbb6a8d47eccbc14420f (patch) | |
tree | e59dcda1e9a4801a1cdf45fd30da8653c66a8fc1 /mcs/class/Facades | |
parent | db67d18d0da569040883ac6c380403c794b2d824 (diff) |
Add System.Drawing converters to netstandard facade (#13326)
This PR adds missing System.Drawing converters thus it completes NS2.1 support (as of today) for all profiles except macOS\IOS specific ones: monotouch, tv, watch, xammac, xammac_net_4_5.
Diffstat (limited to 'mcs/class/Facades')
-rw-r--r-- | mcs/class/Facades/netstandard/Facades_netstandard.csproj | 19 | ||||
-rw-r--r-- | mcs/class/Facades/netstandard/Makefile | 12 | ||||
-rw-r--r-- | mcs/class/Facades/netstandard/TypeForwarders.cs | 2 |
3 files changed, 18 insertions, 15 deletions
diff --git a/mcs/class/Facades/netstandard/Facades_netstandard.csproj b/mcs/class/Facades/netstandard/Facades_netstandard.csproj index ade3ab65815..5de9c894dfb 100644 --- a/mcs/class/Facades/netstandard/Facades_netstandard.csproj +++ b/mcs/class/Facades/netstandard/Facades_netstandard.csproj @@ -6,7 +6,7 @@ <Platform Condition=" '$(Platform)' == '' ">net_4_x</Platform> <ProjectGuid>{E4596A34-AFBC-4744-8352-E6996AC34C16}</ProjectGuid> <OutputType>Library</OutputType> - <NoWarn>1699</NoWarn> + <NoWarn>1699,1616,1699,618</NoWarn> <LangVersion>latest</LangVersion> <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform> <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">macos</HostPlatform> @@ -17,6 +17,7 @@ <AssemblyName>netstandard</AssemblyName> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <SignAssembly>true</SignAssembly> + <DelaySign>true</DelaySign> <AssemblyOriginatorKeyFile>../../Open.snk</AssemblyOriginatorKeyFile> </PropertyGroup> <PropertyGroup> @@ -28,32 +29,32 @@ <PropertyGroup Condition=" '$(Platform)' == 'net_4_x' "> <OutputPath>./../../../class/lib/net_4_x-$(HostPlatform)/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;SYSTEM_DRAWING</DefineConstants> + <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'monodroid' "> <OutputPath>./../../../class/lib/monodroid/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;SYSTEM_DRAWING</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'monotouch' "> <OutputPath>./../../../class/lib/monotouch/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;NO_SYSTEM_DRAWING</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' "> <OutputPath>./../../../class/lib/monotouch_watch/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;NO_SYSTEM_DRAWING</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' "> <OutputPath>./../../../class/lib/monotouch_tv/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV;NO_SYSTEM_DRAWING</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' "> <OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;NO_SYSTEM_DRAWING</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'winaot' "> <OutputPath>./../../../class/lib/winaot/Facades</OutputPath> @@ -63,12 +64,12 @@ <PropertyGroup Condition=" '$(Platform)' == 'xammac' "> <OutputPath>./../../../class/lib/xammac/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants> + <DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;NO_SYSTEM_DRAWING</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' "> <OutputPath>./../../../class/lib/xammac_net_4_5/Facades</OutputPath> <IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath> - <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN</DefineConstants> + <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;NO_SYSTEM_DRAWING</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(Platform)' == 'orbis' "> <OutputPath>./../../../class/lib/orbis/Facades</OutputPath> diff --git a/mcs/class/Facades/netstandard/Makefile b/mcs/class/Facades/netstandard/Makefile index 9a75c93c67a..3f76e8715fa 100644 --- a/mcs/class/Facades/netstandard/Makefile +++ b/mcs/class/Facades/netstandard/Makefile @@ -31,15 +31,10 @@ endif endif -ifeq ($(PROFILE),net_4_x) -LIB_MCS_FLAGS := -d:SYSTEM_DRAWING -endif - ifeq ($(PROFILE),monodroid) # XA implements System.Drawing API inside Mono.Android API_BIN_REFS := Mono.Android LIB_REFS += Facades/System.Drawing.Common -LIB_MCS_FLAGS := -d:SYSTEM_DRAWING endif ifeq ($(PROFILE),monotouch) @@ -65,6 +60,13 @@ ifdef REPO_DRAWING_DEP LIB_REFS += System.Drawing endif +# profiles without System.Drawing (TODO: fix) +NO_SYSTEM_DRAWING := $(filter xammac xammac_net_4_5 monotouch_watch monotouch_tv monotouch_watch monotouch testing_aot_full, $(PROFILE)) + +ifdef NO_SYSTEM_DRAWING +LIB_MCS_FLAGS += -d:NO_SYSTEM_DRAWING +endif + PLATFORM_DEBUG_FLAGS = NO_TEST = yes diff --git a/mcs/class/Facades/netstandard/TypeForwarders.cs b/mcs/class/Facades/netstandard/TypeForwarders.cs index a3cb72cd5fa..be421c1cf06 100644 --- a/mcs/class/Facades/netstandard/TypeForwarders.cs +++ b/mcs/class/Facades/netstandard/TypeForwarders.cs @@ -2446,7 +2446,7 @@ [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.EventSourceCreatedEventArgs))] [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.KnownColor))] [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.DbProviderFactories))] -#if SYSTEM_DRAWING +#if !NO_SYSTEM_DRAWING [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.ColorConverter))] [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.PointConverter))] [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.RectangleConverter))] |