Description
The Microsoft.Extensions.Options.DataAnnotations
library only exists because it has a dependency on System.ComponentModel.Annotations
. Since System.ComponentModel.Annotations
wasn't in netstandard2.0
by default, the code in this library was split into its own package instead of being added to Microsoft.Extensions.Options
.
However, recently we've added a dependency from Microsoft.Extensions.Options
netstandard2.0 to System.ComponentModel.Annotations
in the 6.0.0-preview5.21301.5 NuGet package. It looks like this was added by a combination of #52084 + #35606.
Also, as of 6.0, System.ComponentModel.Annotations
is now part of the netX.0+ TFM by default. It is no longer a separate NuGet package.
With #82749, we are doubling down on this dependency, and fully adding System.ComponentModel.Annotations
code to Microsoft.Extensions.Options
.
Given all these changes, it doesn't make sense to keep Microsoft.Extensions.Options.DataAnnotations
as a separate library/NuGet package. It is just an extra package, assembly, etc and can be merged into Microsoft.Extensions.Options
.
I'm not exactly sure how to do this with NuGet packages. I know we will need TypeForwardedTo
attributes in order to keep back compat working. Does that mean we will need to keep shipping a NuGet package for Microsoft.Extensions.Options.DataAnnotations
with just the TypeForwardedTo
attribute? Maybe we only need to ship 1 more - 8.0.0
with TypeForwardedTo
and then it can be dead-ended after that?