locked
EDMX Loading problem / diagnosis RRS feed

  • Question

  • Hi,
    I'm having a problem getting my EDMX to load in the Entity Model Designer (I'm using SP1 Beta but was having the same problem before) the error I'm getting is "The operation could not be completed. The parameter is incorrect."  However I can't seem to find out any further information about what the problem may be - I guess that I can create a new EDMX but its quite a large model so that would be quite an onerous task  - so i was wondering if theres anywhere I can look for additional log files or similar that might give a bit of a hint as to what the problem is. Any suggestions?

    Thanks in advance

    Roland
    Tuesday, May 20, 2008 8:35 AM

Answers

  • I've checked the event log and theres nothing in there, which is a shame. I have now completely rebuilt the model and the new file loads in the Designer. I was hoping that I'd be able to use a file comparison tool to compare it to the one with the problem but SP1 release seems to have put all the bits into different parts of the file, so it'll need a bit of unpicking  to compare the two so we'll see how this goes
    Tuesday, May 20, 2008 2:17 PM

All replies

  • Hi,

    are you able to open new (empty) model? Maybe some hint can be in event log.

    Just as wild shoot you can extract csdl etc. files and try to run windir%\Microsoft.NET\Framework\v3.5\EdmGen.exe with the /mode:ValidateArtifacts and see whether is there any error.
    Tuesday, May 20, 2008 12:47 PM
  • It seems to be just this one particular EDMX that is causing the problem. Do any problems get written out ot the event log? as i can't see anything that makes sense on a quick inspection - I'll hjave a closer look and see - I'll also give the EdmGen suggestion a whirl and see if that affects anything - I've also started creating the model a new which seems to avoided the issue but obviously thats not an ideal solution to the problem

    Roland
    Tuesday, May 20, 2008 12:59 PM
  • Some problem are sometimes Smile in event log. But, said to be true, I've never find there clue to solve problem (if there was some item), maybe bad luck.
    Tuesday, May 20, 2008 1:07 PM
  • I've checked the event log and theres nothing in there, which is a shame. I have now completely rebuilt the model and the new file loads in the Designer. I was hoping that I'd be able to use a file comparison tool to compare it to the one with the problem but SP1 release seems to have put all the bits into different parts of the file, so it'll need a bit of unpicking  to compare the two so we'll see how this goes
    Tuesday, May 20, 2008 2:17 PM
  • If you still have the old edmx file and want to send it to us you can mail it to noamba at microsoft dot com. That said, the general rule for going from one CTP to another, or from CTPs to Betas, is that the EDMX files from previous releases are not supported, as the file format can change.

    Tuesday, May 20, 2008 4:36 PM
  • Thanks Noam, I'll take you up on the offer to mail you the EDMX as I would be interested to know what the issue was - the problem was occuring though with the previous version just the same as with new beta and it seems only limited to that one EDMX as all my others seem to be working without issue. I've redone the EDMX which only took a few hours so I guess thats the strength of the Entity Framework and Designer approach Smile That said it would be nice to avoid the hassle on too regular a basis

     

    Thanks again for the advice

     

    Regards

     

    Roland Sutton

    Wednesday, May 21, 2008 6:35 AM
  • I've seen the exact same Visual Studio error message when attempting to open a .edmx file after having successfully edited, saved, and closed it moments before. The problem seems to be caused by the EDMX designer as best I can tell.  When it occurs (which is relatively infrequently), it is usually after I've altered the layout of the EDM using the designer doing such things as manually routing connectors (associations and inheritences).

     

    If I edit the .edmx using the XML editor and remove the child elements within the <Diagram> element under the <edmx: Designer>...<edmx: Diagrams> elements, save the .edmx, and then open it using the designer it opens without an error. Of course, using this workaround will remove all of the layout information for the diagram. If you have a large, complex diagram with lots of associations and inheritence, this can be enough to ruin your day. It can be a painful issue if you encounter it and a designer bug that needs to be addressed before RTM of v1.

     

    I'm running VS 2008 Team System Developer with SP1 beta on Windows XP Professional SP2.

     

    Update: I just encountered this error on a relatively small EDM (about 40 entities). I used the above workaround but left all of the <EntityTypeShape> elements in place and removed all of the other elements (connectors, associations, etc). I was able to re-open the .edmx file in the designer while retaining the basic layout. The association and inheritence connections were routed by the designer automatically and, thus, were the only thing that needed manual adjustment. That might yield a good hint about where the problem might lie within the designer but also help others minimize the amount of layout effort lost if they run into this error.

    • Proposed as answer by AaronLST Thursday, May 27, 2010 3:15 PM
    Monday, July 21, 2008 1:55 AM
  • I just encountered this error on a relatively small EDM (about 40 entities). I used the above workaround but left all of the <EntityTypeShape> elements in place and removed all of the other elements (connectors, associations, etc). I was able to re-open the .edmx file in the designer while retaining the basic layout. The association and inheritence connections were routed by the designer automatically and, thus, were the only thing that needed manual adjustment. That might yield a good hint about where the problem might lie within the designer but also help others minimize the amount of layout effort lost if they run into this error.

     

    Thanks for the tip. I've just encountered this problem in SP1 RTM, and your workaround worked.
    Monday, August 25, 2008 6:35 AM
  • I just had this same problem happen to me right now as well.  Everything was happy one second, then I updated my EDM from the database and saved everything.  When I came back to work on the file again later, it would not open.  Using your workaround of removing everything inside of the <Diagram> element fixed the problem.

    I didn't see any other response from Microsoft, so I'm not sure if they are still investigating this problem, but it would be nice to track down the cause of this issue.  I can provide my mapping file if it would be helpful for the dev team to fix this problem.

    BTW, I am using RTM.

    Thanks.
    Monday, September 1, 2008 6:36 AM
  • I am having the same problem.

     

    I worked on the designer all day yesterday without any issues.  Last night I attempted to re-open the file to continue working and the problem came up.  I spent a great deal of time working on this version of the edmx and would, obviously, like to not have to redo all my work.

     

    I am using VS 2008 SP1.  Thank you in advance.

    Wednesday, October 1, 2008 6:02 PM
  • Hey Oliver,

     

    Please can you send me your EDMX file: sanagama -at- microsoft -dot- com? We'll take a look and suggest what to do next.

     

    Regards,

    Sanjay

     

    Tuesday, October 7, 2008 7:44 PM
  • Oliver, try the workaround I posted to see if that gets you passed the issue. I still encounter the issue myself occasionally, even as recently as this morning, with the RTM VS 2008 SP1 version of the Entity Designer.

     

    I've found that removing the <AssociationConnector> and <InheritanceConnector> elements from the designer layout portion of the .edmx file allows me to open the .edmx file again in the designer. (You'll find these elements inside the <edmx: Diagrams>...<Diagram> containing elements in the Designer section of the XML.) Often I'm able to just remove the <AssociationConnector> and <InheritanceConnector> elements that were most recently added to the file without having to remove all of them. So I'd suggest trying that first and then removing more of the connector elements as needed until the Entity Designer is able to open the file again. To avoid rework on repositioning your entities, don't remove your <EntityTypeShape> elements. You may be able to get the designer to open the file without needing to resort to deleting these and that will save you a chunk of time.

     

    As a matter of practice now, I periodically relocate all of the <EntityTypeShape> elements such that they are together and the <AssociationConnector> and <InheritanceConnector> elements are separated. That way, when this issue crops up it is fairly painless to remove the connector elements while retaining the <EntityTypeShape> elements.

     

    Hope this helps you avoid some rework and frustration. I'm sure Microsoft will come up with a real fix for this problem.

     

    -Charles

    Wednesday, October 8, 2008 6:14 PM
  • 2 Sanjay Nagamangalam

    Hi! Is there any news about this problem? I have same problem...

    Monday, October 20, 2008 10:12 AM
  • I have the same symptoms. Double clicking on the edmx file in the Solution explorer does not open the editor.

     

    Closing the solution and re-opening the same solution seems to solve the issue.

     

    I'm on Visual Studio 2008 Team System SP1 RTM

     

     

    Tuesday, October 21, 2008 8:04 AM
  •  I have this problem to.
    I have two files diferent onli in <edmx:Designer>
    First can open second not.
    Exists any fix?
    Sorry my english
    Sunday, February 1, 2009 11:02 AM
  • The solution for this problem is simple:

    1. Right the edmx file in the Solution explorer and select open with, then select XML
    2. Double click the edmx file in the Solution explorer and click Yes to open it

    That should do it, you will be able to see the designer without closing and re-opening the solution/project
    • Proposed as answer by MarcwithaC Monday, February 8, 2010 5:38 PM
    Sunday, February 1, 2009 8:02 PM
  • This not resolve my error.
    If i vant open model i gev error this operation could not by completed.
    I resolve it if create sam model structure anr replace data in edmx:Design.
    Exist fix for creating designer corupt file?
    Sunday, February 1, 2009 11:22 PM
  • I just encountered the same problem,  on Visual Studio 2008 Team System SP1 RTM.

    I manually edited the XML as suggested above, removing everything except the <EntityTypeShape> elements from the <Diagram> element.  This corrected the issue.
    Friday, February 6, 2009 4:53 PM
  • I am getting the same error.  I create my model, save it and when I click on the edmx file it will not open.  I am on Vista with VS 2008 SP 1.

    Anybody have an idea of what is going on here?

    Thanks.
    Monday, February 16, 2009 5:17 AM
  • After reading some answers, I looked at the edmx:Diagrams section and found I had duplicates.  Before that I had to delete associations manually and update the model from the DataBase.  Maybe that caused the problem.  After I deleted the duplicate AssociationConnector, the desinger opened correctly.
    • Proposed as answer by AmDev Friday, May 22, 2009 12:47 PM
    Tuesday, February 17, 2009 2:53 PM
  • I am facing this same issue, I have not found a great solution but as an alternative to closing the solution and re-loading it.

    Just 'Un-load the Project' and 'Re-load the Project' from within the Solution Explorer.

    -R
    Sunday, March 1, 2009 12:14 AM
  • I had exactly the same issue, I also had a duplicate AssociatedConnector. Once I'd removed this from the model the designer started working again. Thanks for the heads up.
    Saturday, May 9, 2009 10:27 AM
  • Deleting all AssociationConnector and InheritanceConnector elements within edmx:Diagrams/Diagram of XML solved the error.
    Jiri
    Tuesday, June 30, 2009 7:28 PM
  • Actually this bug is caused by duplicated connectors. It's easier to remove them all and then correct in designer, than find and delete every duplicate one.
    I hope guys from Microsoft will fix this bug in the next versions))
    Thursday, July 2, 2009 10:05 AM
  • thanks for the posts. I deleted everything in the xml editor between the tag (in my case at the bottom of the file): edmx:Diagrams

    and it worked fine. The designer regenerated everything that I had deleted...although the layour of the models was obviously changed.


    • Edited by coder1979 Tuesday, August 11, 2009 4:26 PM
    Tuesday, August 11, 2009 4:22 PM
  • thanks for the posts. I deleted everything in the xml editor between the tag (in my case at the bottom of the file): edmx:Diagrams

    and it worked fine. The designer regenerated everything that I had deleted...although the layour of the models was obviously changed.



    Same. This proved a 20 second fix. Thanks heaps.
    Thursday, August 13, 2009 12:53 AM
  • Yep,

    Duplicate InheritanceConnectors seems to be the problem. Thanks for the tip, saved my day...
    Monday, August 24, 2009 10:18 PM
  • Just had the same issue in visual studio 2008, the solution of deleting the inheritance connectors worked, and didn't take long, although it took 15-20 minutes to find and read all of this thread first.  I hope msft issues a fix for this in visual studio 2008 asap.

    THANKS
    Thursday, October 15, 2009 4:32 AM
  • Same!! I'm glad I found this. I was getting a little worked up thinking I'd have to regen my edmx!

    THANKS SO MUCH!
    • Proposed as answer by MarcwithaC Monday, February 8, 2010 5:36 PM
    Monday, February 1, 2010 4:55 AM
  • My problem solved with delete duplicate InheritanceConnectors

    Thursday, April 29, 2010 5:46 AM
  • Yeah, after wasting an hour, found this thread and fixed the file in 5 minutes
    Tuesday, May 11, 2010 6:21 AM
  • Same error happened to me today. Amazing how long Microsoft will let a bug live in the software. Even more amazing are the headaches we have to endure because of of it.  
    jad
    Friday, June 18, 2010 7:35 PM
  • Ditto!!! Luckily I found this thread immediately and fixed the problem in 5 min. WHEW. FIX THIS, jeez.
    Thursday, November 4, 2010 9:01 PM
  •   Hope this helps you avoid some rework and frustration. I'm sure Microsoft will come up with a real fix for this problem. 

    -Charles

    Thanks, Charles!

     

    I ran into this issue today (Windows Server 2008 SP2 / Visual Studio 2008), and your workaround helped me out. It was a edmx model which I have made a lot of changes to in the past 12 months, and I really didn't want to go down the path of recreating it from scratch. So, while the "real fix" is still waiting to be applied, I am very grateful that based on the workaround, all I had to do was a quick manual edit, and I am yet again cooking with gas :-)

     

    Peter.

    Tuesday, March 1, 2011 5:04 PM
  • @Charles Don't count on Microsoft fixing problems. More often than not, they just respond to bug reports with "Closed. Works as designed."


    • Edited by Suncat2000 Thursday, March 26, 2020 9:59 PM
    Thursday, March 26, 2020 9:59 PM