Search code examples
visual-studio-2010class-diagram

VisualStudio 2010 Cannot load class diagram "Exception of type 'System.Exception' was thrown."


In a VisualStudio 2010 solution with many projects one of the projects contains some class diagrams. When I try to open them I get the error message Cannot load '<class diagram file>': Exception of type 'System.Exception' was thrown.

Besides googling (I only found solutions for some different problems) I tried the following things:

  • removed some and all class diagram content: got the same error
  • added a new class diagram to the project: got the same error
  • created a new solution & project, and added a new class diagram: it worked!
  • created a new solution and added the existing project with the class diagrams: it worked!
  • deleted SUO and SDF file: got the same error

Any idea how I can fix my solution? Creating a new solution would be possible, but tedious, and I would risk to encounter the same problem again. Because the solution is copy right protected and massive I cannot provide it.


Solution

  • Follow these steps:

    • Go to Project » Properties.
    • Click on Framework And References.
    • Remove all the references.