0

I'm having trouble creating/updating EntityFramework models. I have a visual studio 2008 windows forms project the has been compiling and running for years.

Then today, I decide to touch it in order to add a new feature. After a few modifications I decide to update the .edmx file so it can sync with the database, and suddenly I get a lot of different errors in the models designer.vb file.

Below is a sample screen shoot of the error window.

enter image description here

Now for example when I click on the first error in the screen shoot above, I'm taken to the code in screen shoot below. (where the "Attribute 'SerializableAttribute' cannot be applied multiple times" error is.)

This is just one of several different errors.

enter image description here

I have tried totally deleting the model from the project and then re-creating it a fresh but I'm hitting the same errors again and again.

Chris Schmich
  • 29,128
  • 5
  • 77
  • 94
StackTrace
  • 9,190
  • 36
  • 114
  • 202

1 Answers1

0

If you have extended your classes' definitions with the help of partial classes and you decorated them with the Serializable attribute, you will need to remove this attribute from your manually created partial class.

Also, this answer might be helpful: https://stackoverflow.com/a/7809482/674700.

Community
  • 1
  • 1
Alex Filipovici
  • 31,789
  • 6
  • 54
  • 78