You get the same problem if you use VS' Static Code Analysis tool. If you enable Code Analysis on Build and set the rule set to Microsoft Basic Correctness Rules, you get a ton of errors from the Code-Based Migrations generated (designer) files. I had to go into the designer files and add the GeneratedCode attribute to them. Since these files are generated, this attribute should be on those classes. J
↧