Dead end System.ComponentModel.Annotations package (#51891)
authorViktor Hofer <viktor.hofer@microsoft.com>
Tue, 27 Apr 2021 17:48:32 +0000 (19:48 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Apr 2021 17:48:32 +0000 (19:48 +0200)
Nearly all configurations in the System.ComponentModel.Annotations
package weren't built live anymore and just redistributed from older
packages. Except for the netstandard2.0 configuration, the package
didn't receive any changes. As the library is exposed as part of the
shared framework, a reference to the package on .NETCoreApp isn't
necessary and will be ignored by the SDK.

Based on these reasons, dead-ending the package to remove the burden
of maintaining the harvesting of old configurations.

Contributes to https://github.com/dotnet/runtime/issues/47530

eng/Versions.props
src/libraries/Microsoft.Extensions.Options.DataAnnotations/src/Microsoft.Extensions.Options.DataAnnotations.csproj
src/libraries/System.ComponentModel.Annotations/Directory.Build.props
src/libraries/System.ComponentModel.Annotations/pkg/System.ComponentModel.Annotations.pkgproj [deleted file]
src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.csproj
src/libraries/System.ComponentModel.Annotations/src/System.ComponentModel.Annotations.csproj
src/libraries/pkg/baseline/packageIndex.json

index 741eb08..e823b62 100644 (file)
@@ -81,7 +81,7 @@
     <SystemBuffersVersion>4.5.1</SystemBuffersVersion>
     <SystemCollectionsVersion>4.3.0</SystemCollectionsVersion>
     <SystemCollectionsConcurrentVersion>4.3.0</SystemCollectionsConcurrentVersion>
-    <SystemComponentModelAnnotationsVersion>4.7.0</SystemComponentModelAnnotationsVersion>
+    <SystemComponentModelAnnotationsVersion>5.0.0</SystemComponentModelAnnotationsVersion>
     <SystemDataSqlClientVersion>4.8.1</SystemDataSqlClientVersion>
     <SystemDiagnosticsContractsVersion>4.3.0</SystemDiagnosticsContractsVersion>
     <SystemDiagnosticsDebugVersion>4.3.0</SystemDiagnosticsDebugVersion>
index bcf5ce5..56e09a3 100644 (file)
     <ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
     <PackageReference Include="System.ComponentModel.Annotations" Version="$(SystemComponentModelAnnotationsVersion)" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
-    <ProjectReference Include="$(LibrariesProjectRoot)System.ComponentModel.Annotations\src\System.ComponentModel.Annotations.csproj" />
-  </ItemGroup>
-
   <ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
     <Reference Include="System.ComponentModel.DataAnnotations" />
   </ItemGroup>
index 4c4a6c6..63f02a0 100644 (file)
@@ -2,18 +2,5 @@
   <Import Project="..\Directory.Build.props" />
   <PropertyGroup>
     <StrongNameKeyId>Microsoft</StrongNameKeyId>
-    <PackageDescription>Provides attributes that are used to define metadata for objects used as data sources.
-
-Commonly Used Types:
-System.ComponentModel.DataAnnotations.ValidationResult
-System.ComponentModel.DataAnnotations.IValidatableObject
-System.ComponentModel.DataAnnotations.ValidationAttribute
-System.ComponentModel.DataAnnotations.RequiredAttribute
-System.ComponentModel.DataAnnotations.StringLengthAttribute
-System.ComponentModel.DataAnnotations.DisplayAttribute
-System.ComponentModel.DataAnnotations.RegularExpressionAttribute
-System.ComponentModel.DataAnnotations.DataTypeAttribute
-System.ComponentModel.DataAnnotations.RangeAttribute
-System.ComponentModel.DataAnnotations.KeyAttribute</PackageDescription>
   </PropertyGroup>
 </Project>
\ No newline at end of file
diff --git a/src/libraries/System.ComponentModel.Annotations/pkg/System.ComponentModel.Annotations.pkgproj b/src/libraries/System.ComponentModel.Annotations/pkg/System.ComponentModel.Annotations.pkgproj
deleted file mode 100644 (file)
index dd046a9..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<Project DefaultTargets="Build">
-  <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
-  <ItemGroup>
-    <ProjectReference Include="..\ref\System.ComponentModel.Annotations.csproj">
-      <SupportedFramework>netcoreapp3.0;$(AllXamarinFrameworks)</SupportedFramework>
-    </ProjectReference>
-    <ProjectReference Include="..\src\System.ComponentModel.Annotations.csproj" />
-    <HarvestIncludePaths Include="ref/netcore50;lib/netcore50" />
-    <HarvestIncludePaths Include="ref/netstandard1.1" />
-    <HarvestIncludePaths Include="ref/netstandard1.3" />
-    <HarvestIncludePaths Include="ref/netstandard1.4;lib/netstandard1.4" />
-    <HarvestIncludePaths Include="ref/netstandard2.0;lib/netstandard2.0" />
-    <HarvestIncludePaths Include="ref/net461;lib/net461" />
-    <InboxOnTargetFramework Include="$(AllXamarinFrameworks)" />
-    <InboxOnTargetFramework Include="net45">
-      <FrameworkReference>System.ComponentModel.DataAnnotations</FrameworkReference>
-    </InboxOnTargetFramework>
-    <InboxOnTargetFramework Include="win8" />
-    <InboxOnTargetFramework Include="portable-net45+win8" />
-    <ValidatePackageSuppression Include="PermitMissingImplementation">
-      <!-- Supported inbox by all ns1.1-1.3 frameworks -->
-      <Value>.NETStandard,Version=v1.1;.NETStandard,Version=v1.2;.NETStandard,Version=v1.3</Value>
-    </ValidatePackageSuppression>
-    <ValidatePackageSuppression Include="TreatAsOutOfBox">
-      <Value>.NETCoreApp;UAP</Value>
-    </ValidatePackageSuppression>
-  </ItemGroup>
-  <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
-</Project>
\ No newline at end of file
index 0f88fe4..2267869 100644 (file)
@@ -1,12 +1,14 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.1</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
     <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System.ComponentModel.Annotations.cs" />
-    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs" />
-    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\DynamicallyAccessedMemberTypes.cs" />
-    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\RequiresUnreferencedCodeAttribute.cs" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+  <ItemGroup>
+    <ProjectReference Include="$(LibrariesProjectRoot)System.ComponentModel\ref\System.ComponentModel.csproj" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.ComponentModel.TypeConverter\ref\System.ComponentModel.TypeConverter.csproj" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.csproj" />
+  </ItemGroup>
+</Project>
index bc9a413..9c9dfeb 100644 (file)
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent);netstandard2.1</TargetFrameworks>
-    <ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
+    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
     <Nullable>enable</Nullable>
     <!--
       Since many resource strings in this library are shown to an end-user,
     <Compile Include="$(CommonPath)System\NotImplemented.cs"
              Link="Common\System\NotImplemented.cs" />
   </ItemGroup>
-  <ItemGroup Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) != '.NETCoreApp'">
-    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs" />
-    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\DynamicallyAccessedMemberTypes.cs" />
-    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\RequiresUnreferencedCodeAttribute.cs" />
-    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" />
-  </ItemGroup>
-  <ItemGroup Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp'">
+  <ItemGroup>
     <Reference Include="System.Collections" />
     <Reference Include="System.Collections.Concurrent" />
     <Reference Include="System.ComponentModel" />
index e9d4d02..4baf29f 100644 (file)
         "4.6.0",
         "5.0.0"
       ],
-      "BaselineVersion": "6.0.0",
+      "BaselineVersion": "5.0.0",
       "InboxOn": {
         "netcoreapp2.0": "4.2.0.0",
         "netcoreapp2.1": "4.2.1.0",
         "4.2.0.0": "4.4.0",
         "4.2.1.0": "4.5.0",
         "4.3.0.0": "4.6.0",
-        "5.0.0.0": "5.0.0",
-        "6.0.0.0": "6.0.0"
+        "5.0.0.0": "5.0.0"
       }
     },
     "System.ComponentModel.Composition": {