I'm having a problem in Visual Studio 2012. When I modify my windows form in any way, the following constraints are auto-generated:
Me.DataSet.DatabaseSpecs.Constraints.AddRange(New System.Data.Constraint() {New System.Data.UniqueConstraint("Constraint1", New String() {"ID"}, True)})
Me.DataSet.DatabaseSpecs.TableName = "TableName"
This is causing me to have a run-time error as well as preventing me from viewing the form in design view, "InvalidOperationException" with the message "Cannot add primary key constraint since primary key is already set for the table."
If I go in and remove all of the auto-generated code, the program will load up just fine.
Is there a way to stop this code from being generated?