While I added the Nuget packages System.ComponentModel.Annotations
I am getting the error
type or namespace name 'DataAnnotations' does not exist in the namespace 'System.ComponentModel'
What happened is that I openend an old ASP.NET Core 1.0 project from a book sample and VS17 upgraded it. Then off course I got a lot of warnings from the VS17 in the NuGet dependencies. So I converted the project to Core 2.1 and updated all NuGet dependencies.
But now it complains about the attributes.
Any idea ?