Skip to content

Commit

Permalink
Minor clean-up from Drawing migration (#8861)
Browse files Browse the repository at this point in the history
Use the floating TFM properties defined in Arcade
Enable ApiCompat's optional rules
Remove obsolete commentMinor clean-up from Drawing migration
  • Loading branch information
ViktorHofer authored Mar 16, 2023
1 parent c1a1857 commit 6167d44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/System.Drawing.Common/src/System.Drawing.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- net6.0 TFM isn't buildable as it depends on LibraryImportAttribute which isn't availble. -->
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>$(NetCurrent);$(NetPrevious);$(NetMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<TargetFramework />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
Expand All @@ -12,6 +11,7 @@
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<!-- This should point to the last stable released version of this package. -->
<PackageValidationBaselineVersion>7.0.0</PackageValidationBaselineVersion>
<AddXamarinPlaceholderFilesToPackage>true</AddXamarinPlaceholderFilesToPackage>
<PackageDescription>Provides access to GDI+ graphics functionality.
Expand Down
12 changes: 8 additions & 4 deletions src/System.Drawing.Common/src/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<DisablePackageBaselineValidation Condition="'$(IsShipping)' == 'false' or
'$(SuppressFinalPackageVersion)' == 'true' or
'$(DotNetBuildFromSource)' == 'true'">true</DisablePackageBaselineValidation>
<!-- Optional rules -->
<ApiCompatEnableRuleCannotChangeParameterName>true</ApiCompatEnableRuleCannotChangeParameterName>
<ApiCompatEnableRuleAttributesMustMatch>true</ApiCompatEnableRuleAttributesMustMatch>

<BeforePack>$(BeforePack);AddNETStandardCompatErrorFileForPackaging</BeforePack>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>
Expand Down Expand Up @@ -54,13 +58,13 @@
than the minimum supported one. -->
<ItemGroup>
<NETStandardCompatError Include="netcoreapp2.0"
Supported="net6.0"
Supported="$(NetMinimum)"
Condition="$(TargetFrameworks.Contains('netstandard2.')) and
($(TargetFrameworks.Contains('net6.0')) or $(TargetFrameworks.Contains('net7.0')) or $(TargetFrameworks.Contains('net8.0')))" />
($(TargetFrameworks.Contains('$(NetMinimum)')) or $(TargetFrameworks.Contains('$(NetPrevious)')) or $(TargetFrameworks.Contains('$(NetCurrent)')))" />
<NETStandardCompatError Include="net461"
Supported="net462"
Supported="$(NetFrameworkMinimum)"
Condition="$(TargetFrameworks.Contains('netstandard2.0')) and
($(TargetFrameworks.Contains('net462')) or $(TargetFrameworks.Contains('net47')) or $(TargetFrameworks.Contains('net48')))" />
($(TargetFrameworks.Contains('$(NetFrameworkMinimum)')) or $(TargetFrameworks.Contains('net47')) or $(TargetFrameworks.Contains('net48')))" />
</ItemGroup>

<!-- Add targets file that marks a .NETStandard applicable tfm as unsupported. -->
Expand Down

0 comments on commit 6167d44

Please sign in to comment.