From: Maxim Lipnin Date: Thu, 9 Jul 2020 23:04:56 +0000 (+0300) Subject: [wasm] Modify System.Drawing.Common to throw PNSE on Browser (#38999) X-Git-Tag: submit/tizen/20210909.063632~6831 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16840f34b7154fde6ab0bfb3d51c3b588102cc89;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [wasm] Modify System.Drawing.Common to throw PNSE on Browser (#38999) Co-authored-by: Santiago Fernandez Madero --- diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index e521cc8..5cbc77d 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -7,6 +7,7 @@ $(NoWarn);nullable + $(NoWarn);nullable diff --git a/src/libraries/System.Drawing.Common/src/Resources/Strings.resx b/src/libraries/System.Drawing.Common/src/Resources/Strings.resx index 0ec4b7e..f5ba77e 100644 --- a/src/libraries/System.Drawing.Common/src/Resources/Strings.resx +++ b/src/libraries/System.Drawing.Common/src/Resources/Strings.resx @@ -458,4 +458,7 @@ The directory {0} of the filename {1} does not exist. + + System.Drawing.Common is not supported on this platform. + \ 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 07b0e50..0a20f12 100644 --- a/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj +++ b/src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj @@ -9,7 +9,10 @@ true enable - + + SR.SystemDrawingCommon_PlatformNotSupported + + @@ -295,7 +298,7 @@ Link="Common\Interop\Windows\Interop.HRESULT.cs" /> - + diff --git a/src/libraries/System.Drawing.Common/tests/AssemblyInfo.cs b/src/libraries/System.Drawing.Common/tests/AssemblyInfo.cs index 677d346..17f4649 100644 --- a/src/libraries/System.Drawing.Common/tests/AssemblyInfo.cs +++ b/src/libraries/System.Drawing.Common/tests/AssemblyInfo.cs @@ -5,3 +5,4 @@ using System; using Xunit; [assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/35917", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoInterpreter))] +[assembly: SkipOnMono("System.Drawing.Common is not supported on Browser", TestPlatforms.Browser)] diff --git a/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj b/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj index 752aecd..0b13547 100644 --- a/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj +++ b/src/libraries/System.Drawing.Common/tests/System.Drawing.Common.Tests.csproj @@ -3,6 +3,7 @@ true true $(NetCoreAppCurrent);$(NetFrameworkCurrent) + true @@ -105,4 +106,4 @@ System.Drawing.Tests.Icon_toolboxBitmapAttributeTest - \ No newline at end of file + diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index d369aba..ae20da8 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -40,7 +40,6 @@ -