I understand that the ADO.NET Entity Data Model Designer is still in its infancy, but I have to wonder how this bug was missed. If you open a model in the ADO.NET Entity Data Model Designer by double-click on it or right-clicking and choosing Open the model opens fine. Close it and try the same thing again. The model will not open.
Luckily the workaround is not too much of a pain. Do the following to get the designer to open the model again.
- Close the model.
- Right-click on the Model.edmx (or similarly named file) in the Solution Explorer in Visual Studio 2008.
- Choose Open With…
- In the windows that comes up, choose XML Editor and click the OK button. Actually you can also use the Source Code (Text) Editor. You really just need an editor that can read xml, so most of them will work. The key is to open it in something other than the ADO.NET Entity Data Model Designer.
- Close Model.
- Double-click on the Model.edmx (or similarly named file) to open it as you usually would.
Unfortunately, you will need to do this every time you close the model and then want to re-open it. It is better than the other workaround of restarting Visual Studio 2008.