I'm using EF 6.1 with the downloaded T4 template from VS. When I try to update the EF model with new information, or just issue a refresh from my database, the model file duplicates and I get a massive amount of errors.
So, for example, my model file is called Test.edmx, which has subfiles called Test.Designer.vb and TestModel.tt. The TestModel.tt has a subfile called TestModel.vb which appears to contain all my entity framework models.
When I right click on the design surface and select "update model from database", and either add a new entity or refresh an existing one, instead of updating the TestModel.vb file, it creates a whole new file called TestModel1.vb. Once that happens I get thousands of duplicate item exceptions, because now there a doubles.
Why is this happening, and how can I fix it? Is something configured wrong? This model was previously using EF4 and was upgraded straight to 6 using these instructions. https://msdn.microsoft.com/en-us/data/upgradeef6.aspx