This project is read-only.


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.
Closed Jan 8, 2013 at 9:31 PM by lukew
Change is in daily after 1/7


RoMiller wrote Nov 30, 2012 at 9:23 PM

EF Team Triage: Approving for EF6. Adjusting title to make it clear that this is about the code behind file and not the code that is scaffolded for the developer to own.