Visual Studio 2015 generate UML from code

42,742

Solution 1

In solution explorer right click and:

add > item.. > General > class diagram

Then you can fairly easy make a domain model by dragging entity classes in and right click on a few properties and choose: "Show as association"

Solution 2

To view UML diagram of your project, make right-click on your project and select View->Class diagram. Auto-generated UML of your project will be opened

Share:
42,742

Related videos on Youtube

Daniel Eisenreich
Author by

Daniel Eisenreich

I love to get in touch with new technologies and stay with the time.

Updated on July 09, 2022

Comments

  • Daniel Eisenreich
    Daniel Eisenreich almost 2 years
    • Windows 10 64-bit
    • Microsoft Visual Studio Enterprise 2015 Version:14.0.25431.01 Update 3

    I have a almost finished project and now I need to write a documentation. I found some information in the www which tells to "simply" generate UML from the existing code.

    At the top Menu is a section with Architecture and there I can create new UML diagrams, but I can't import the classes which the project have. In all the other forum entries they was talking about a Architecture Explorer where you can simply drag and drop the needed classes and the dependencies are automatically created, but in my case this view is missing.

    If you have some good advise how to document the software differently, you're welcome.

  • Daniel Eisenreich
    Daniel Eisenreich over 7 years
    This worked, but now I only have the class diagrams without the dependencies, how can I add them?
  • Daniel Eisenreich
    Daniel Eisenreich over 7 years
    Now I have all needed classes there., but dont find "Show as association".
  • Daniel Eisenreich
    Daniel Eisenreich over 7 years
    I got it. Thank you very much!
  • Daniel Eisenreich
    Daniel Eisenreich over 6 years
    @amod0017 Keep in mind that if we talk about association, it not goes around which object is used in which class, but which class inherits from which interface/class. At this point I also thought the class diagram is like we learned in university with the first association I explained above, but it isn't.
  • naz786
    naz786 almost 6 years
    So, how do you add associations within Visual Studio? I have an MVC project.
  • Daniel Eisenreich
    Daniel Eisenreich over 5 years
    @naz786 nowadays I use ReSharper to generate a dependency diagram.

Related