.NET Data Model is shown as XML and not as Diagram

2019-06-28 07:44发布

问题:

That is. I format my computer and install the entire enviroment again, but I can't see the data model diagram. I mean, I open the data model (edmx file) and I see all the DB tables and DB information in an XML file. Not the diagram.

I installed vs2010 sp1, net framework 4, micro net framework 4.1, entity framework 4.1

I don't know what I am missing. Can you help me?

Without that I cannot update the model.

Is seems easy but I don't know how to solve it.

回答1:

If you open the EDMX file in the solution explorer of Visual Studio with "Right-Mouse-Click->Open With..." ...

...what do you see in the following dialog? It should be like this:

If looks like in your case the "default" (= format when you just double click on the EDMX file) is one of the XML editors. It should be "ADO.NET Entity Data Model Designer". You can make it the default by selecting the line in the list box and then click on "Set as Default" on the right side.