From d870ebcc01f730b5ca277f1beee83eb9cf8b5f1e Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 27 Apr 2021 16:52:47 +0200 Subject: [PATCH] Drawing: Replace harvested assets with live config Removing the netcoreapp2.0, netstandard2.0 and net461 configurations of System.Drawing.Common as these aren't built live anymore (harvested). Replace the netstandard2.0 and net461 harvested asset with live builds and stop supporting netcoreapp2.x. Bringing these assets back as the minimum supported set of platforms are ones that support netstandard2.0 and are still in support. Contributes to https://github.com/dotnet/runtime/issues/47530 --- .../Directory.Build.targets | 6 +++ .../pkg/System.Drawing.Common.pkgproj | 9 ++-- .../System.Drawing.Common.targets | 7 +++ .../ref/System.Drawing.Common.csproj | 14 +++-- .../ref/System.Drawing.Common.netstandard.cs | 54 +++++++++++++++++++ .../src/System.Drawing.Common.csproj | 14 ++--- 6 files changed, 91 insertions(+), 13 deletions(-) create mode 100644 src/libraries/System.Drawing.Common/Directory.Build.targets create mode 100644 src/libraries/System.Drawing.Common/pkg/buildTransitive/System.Drawing.Common.targets create mode 100644 src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs diff --git a/src/libraries/System.Drawing.Common/Directory.Build.targets b/src/libraries/System.Drawing.Common/Directory.Build.targets new file mode 100644 index 0000000000000..3e682046d73dd --- /dev/null +++ b/src/libraries/System.Drawing.Common/Directory.Build.targets @@ -0,0 +1,6 @@ + + + + 4.0.1.0 + + diff --git a/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj b/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj index 6754147288e20..4a74eb0fadbae 100644 --- a/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj +++ b/src/libraries/System.Drawing.Common/pkg/System.Drawing.Common.pkgproj @@ -2,13 +2,14 @@ - netcoreapp3.0 + netcoreapp3.0;net461 - - - + + diff --git a/src/libraries/System.Drawing.Common/pkg/buildTransitive/System.Drawing.Common.targets b/src/libraries/System.Drawing.Common/pkg/buildTransitive/System.Drawing.Common.targets new file mode 100644 index 0000000000000..395a71b4e5e8e --- /dev/null +++ b/src/libraries/System.Drawing.Common/pkg/buildTransitive/System.Drawing.Common.targets @@ -0,0 +1,7 @@ + + + + + diff --git a/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.csproj b/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.csproj index c5678ab357925..93dc1cf86f856 100644 --- a/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.csproj +++ b/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.csproj @@ -1,15 +1,20 @@  - $(NetCoreAppCurrent);netcoreapp3.0 + $(NetCoreAppCurrent);netcoreapp3.0;netstandard2.0;net461 true true enable + + + true + - + + - + @@ -34,4 +39,7 @@ + + + diff --git a/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs b/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs new file mode 100644 index 0000000000000..671f9cbe6e75b --- /dev/null +++ b/src/libraries/System.Drawing.Common/ref/System.Drawing.Common.netstandard.cs @@ -0,0 +1,54 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the https://aka.ms/api-review process. +// ------------------------------------------------------------------------------ + +namespace System.Drawing +{ + public static partial class ColorTranslator + { + public static System.Drawing.Color FromHtml(string htmlColor) { throw null; } + public static System.Drawing.Color FromOle(int oleColor) { throw null; } + public static System.Drawing.Color FromWin32(int win32Color) { throw null; } + public static string ToHtml(System.Drawing.Color c) { throw null; } + public static int ToOle(System.Drawing.Color c) { throw null; } + public static int ToWin32(System.Drawing.Color c) { throw null; } + } + public static partial class SystemColors + { + public static System.Drawing.Color ActiveBorder { get { throw null; } } + public static System.Drawing.Color ActiveCaption { get { throw null; } } + public static System.Drawing.Color ActiveCaptionText { get { throw null; } } + public static System.Drawing.Color AppWorkspace { get { throw null; } } + public static System.Drawing.Color ButtonFace { get { throw null; } } + public static System.Drawing.Color ButtonHighlight { get { throw null; } } + public static System.Drawing.Color ButtonShadow { get { throw null; } } + public static System.Drawing.Color Control { get { throw null; } } + public static System.Drawing.Color ControlDark { get { throw null; } } + public static System.Drawing.Color ControlDarkDark { get { throw null; } } + public static System.Drawing.Color ControlLight { get { throw null; } } + public static System.Drawing.Color ControlLightLight { get { throw null; } } + public static System.Drawing.Color ControlText { get { throw null; } } + public static System.Drawing.Color Desktop { get { throw null; } } + public static System.Drawing.Color GradientActiveCaption { get { throw null; } } + public static System.Drawing.Color GradientInactiveCaption { get { throw null; } } + public static System.Drawing.Color GrayText { get { throw null; } } + public static System.Drawing.Color Highlight { get { throw null; } } + public static System.Drawing.Color HighlightText { get { throw null; } } + public static System.Drawing.Color HotTrack { get { throw null; } } + public static System.Drawing.Color InactiveBorder { get { throw null; } } + public static System.Drawing.Color InactiveCaption { get { throw null; } } + public static System.Drawing.Color InactiveCaptionText { get { throw null; } } + public static System.Drawing.Color Info { get { throw null; } } + public static System.Drawing.Color InfoText { get { throw null; } } + public static System.Drawing.Color Menu { get { throw null; } } + public static System.Drawing.Color MenuBar { get { throw null; } } + public static System.Drawing.Color MenuHighlight { get { throw null; } } + public static System.Drawing.Color MenuText { get { throw null; } } + public static System.Drawing.Color ScrollBar { get { throw null; } } + public static System.Drawing.Color Window { get { throw null; } } + public static System.Drawing.Color WindowFrame { get { throw null; } } + public static System.Drawing.Color WindowText { get { throw null; } } + } +} \ No newline at end of file diff --git a/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj b/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj index a0e1544cb8be0..12b36f7d60cd8 100644 --- a/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj +++ b/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj @@ -5,13 +5,14 @@ CS0618 $(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS;FEATURE_SYSTEM_EVENTS true - $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent);netcoreapp3.0-windows;netcoreapp3.0-Unix;netcoreapp3.0 + $(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent);netcoreapp3.0-windows;netcoreapp3.0-Unix;netcoreapp3.0;net461;netstandard2.0 true - true enable + - SR.SystemDrawingCommon_PlatformNotSupported + true + SR.SystemDrawingCommon_PlatformNotSupported @@ -360,10 +361,8 @@ placeholder.ico - + - - @@ -389,4 +388,7 @@ + + +