<PropertyGroup>
<NoWarn Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFramework)' == 'netcoreapp2.1'">$(NoWarn);nullable</NoWarn>
+ <NoWarn Condition="'$(GeneratePlatformNotSupportedAssembly)' == 'true' or '$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(NoWarn);nullable</NoWarn>
<!-- Reset these properties back to blank, since they are defaulted by Microsoft.NET.Sdk -->
<FileAlignment Condition="'$(FileAlignment)' == '512'" />
<ErrorReport Condition="'$(ErrorReport)' == 'prompt'" />
<data name="TargetDirectoryDoesNotExist" xml:space="preserve">
<value>The directory {0} of the filename {1} does not exist.</value>
</data>
+ <data name="SystemDrawingCommon_PlatformNotSupported" xml:space="preserve">
+ <value>System.Drawing.Common is not supported on this platform.</value>
+ </data>
</root>
\ No newline at end of file
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<Nullable>enable</Nullable>
</PropertyGroup>
- <ItemGroup>
+ <PropertyGroup>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsBrowser)' == 'true'">SR.SystemDrawingCommon_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ </PropertyGroup>
+ <ItemGroup Condition="'$(TargetsBrowser)' != 'true'">
<Compile Include="System\Drawing\Bitmap.cs" />
<Compile Include="System\Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
<Compile Include="System\Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
Link="Common\Interop\Windows\Interop.HRESULT.cs" />
</ItemGroup>
<!-- Unix specific -->
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' or '$(TargetsBrowser)' == 'true'">
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="System\Drawing\Graphics.Unix.cs" />
<Compile Include="System\Drawing\Icon.Unix.cs" />
<Compile Include="System\Drawing\SystemFonts.Unix.cs" />
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)]
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
+ <IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<LogicalName>System.Drawing.Tests.Icon_toolboxBitmapAttributeTest</LogicalName>
</EmbeddedResource>
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.TextWriterTraceListener\tests\System.Diagnostics.TextWriterTraceListener.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.TraceSource\tests\System.Diagnostics.TraceSource.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.Tracing\tests\System.Diagnostics.Tracing.Tests.csproj" />
- <ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Drawing.Common\tests\System.Drawing.Common.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Formats.Asn1\tests\System.Formats.Asn1.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Globalization.Calendars\tests\CalendarTestWithConfigSwitch\System.Globalization.CalendarsWithConfigSwitch.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Globalization.Calendars\tests\System.Globalization.Calendars.Tests.csproj" />