There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
UpForGrabs: Migrations: Generated Code (in Designer.cs Code Behind) Missing GeneratedCode Attribute
When you execute Add-Migration it will generate a new class in the Migrations folder that has an associated Designer file. Designer files are not meant to be updated by the developer, and should have both an aout-generated comment (// <auto-generated
/>) and the class should have a GeneratedCode attribute. These are required in order for static code analysis tools to ignore these files/classes.
The auto-generated comment will disable checking of these files by StyleCop, and the GeneratedCode attribute will cause the Visual Studio Static Code Analysis tool to ignore the class. If not, and you enable Code Analysis on Build in VS, these class will cause
Code Analysis messages to be generated.