Search code examples
c#visual-studio-2010umlclass-diagram

Visual Studio Class Diagram Viewer stand alone


Visual Studio Makes Class diagrams and if we open it in text editor program it is a simple XML. Surely we can generate that on runtime. But the problem is although you have visual studio to see the Class Diagram Generated but what solution is there if we want to deploy application where there is no Visual Studio Installed?

  1. Is there any possibility or available plugin or library that can generate Class diagram or UML diagram from XML?
  2. Can we somehow use Visual Studio Class Diagram to view it on runtime?
  3. Not Sure but what if we generate xml on Back end and then if possible create Image (png or gif) using some builtin plugin and display that? (I am really not sure about this idea :()

I have seen NClass It is very good but a bit complex and it is not developed through XML.


Solution

  • I suggest to use PowerToys for Class Designer (http://modeling.codeplex.com). It improves the Class Designer and allows you to export diagrams to HTML. This way is easy to distribute to any machine.

    As an alternative, you can take a different path with reflection, in this case you don't need the visual studio class diagram; the diagrams are generated by inspecting the requested types. I suggest to read the articles by Sacha Barber (http://www.codeproject.com/Articles/17823/100-Reflective-Class-Diagram-Creation-Tool and http://www.codeproject.com/Articles/207280/200-Reflective-Class-Diagram-Creation-Tool). Maybe you can customize his application.