12

I'm looking at the various Architecture features of Visual Studio 2015 Enterprise edition. All looks good.

However, I have code that is all ready written and I would like to generate Class Diagrams from it. NOT the standard Add Class Diagram in a Project - but from the UML Class Diagrams. I have created a Modelling Project for this.

I cannot see a way to do this - is it possible? Can I reverse engineer existing code into nice diagrams?

Here is my solution view:

Solution View

Here is the Class Diagram Designer:

Class Diagram Designer

I can drag and drop projects from Solution Explorer into a Layered Diagram but nothing with classes. Here is one I made earlier:

Layered Diagram

I can drag and drop classes into Code Map from Solution Explorer. It would be nice to have all my modelling in one project. I really hate the old class diagramming where you add it to a single project.

This seemed to be a feature in previous Ultimate editions. However, the following Url does not have a link for 2015 (only up to 2013).

MSDN

UPDATE

I installed 2013 Ultimate we have a licence for and indeed all of this functionality is in this version. Why not 2015 Enterprise? Can we expect Microsoft is not going to support this no longer and is phasing it out? Or was it a case of there was no time for 2015 and it will be included in an update.

Andez
  • 5,588
  • 20
  • 75
  • 116

1 Answers1

10

TLDR; at this point Visual Studio 2015+ doesn't have plans to support reverse engineering to the UML class diagram, nor to the UML sequence diagram.

Visual Studio 2015 uses brand new compilers (project Roslyn) for C# and VB, and many features that interact with the code had to be reworked to support the new paradigm.

At the same time, our telemetry data shows that reverse engineering is not used that much. Conversations with customers show that many people are moving to faster release cycles, which means that diagrams go out of date too quickly to be useful.

As such we decided to invest in Class Diagrams (not the UML ones) and in Code Map. Both of these support reverse engineering. Code Map in particular has been worked on to eliminate many bugs and improve performance and scalability, and is the technology of choice for analyzing architecture. Here's an article that shows some scenarios that Code Map is good at.

That said, VS 2013 continues to support these scenarios and you can install it side by side. You can ask for features on UserVoice - there is already a request to bring back sequence diagram reverse engineering.

What were you planning to use Reverse Engineer for?

Bogdan Gavril MSFT
  • 20,615
  • 10
  • 53
  • 74
  • 2
    Hey Bogdan. I feel diagrams provide a nice overview of a flow between one end of an application to another. Such is in my case I wanted to create a sequence diagram to show what was called in order to save some objects to the database. There were a number of layers in the application built up on services and interfaces. Everything used Dependency Injection (Unity) which had all of the configuration mappings in code. Here it was hard to see what called what - especially when new to someone else's code. I thought the diagram would help. – Andez Sep 02 '15 at 15:37
  • As for standard class diagrams - I personally feel having a class diagram in a single project is not the way forward. I much prefer the ones in the architectural (uml) project. It allows you to pull in classes from various projects and piece together the big picture. I don't think you can do this in the standard "insert class diagram" project ones. – Andez Sep 02 '15 at 15:39
  • CodeMap is a great tool however. Will see how it fairs with our Enterprise level system. Thanks for the info – Andez Sep 02 '15 at 15:40
  • Since this feature works with the Class Diagrams which live in project containing source (*.cd). Is there a way to place those in a Model project? – Coach David Oct 30 '15 at 17:51
  • I may be taking for granted the term reverse engineer. We create the ".CD" files and they stay in sync with the code. Is this reverse engineering? Is that different from doing the same in the model or at least the ability to do the same? – Coach David Oct 30 '15 at 17:58
  • 1
    Having the ".cd" class diagrams and the UML Class Diagrams has always been a source of confusion. The reason they are like that is mostly historic, but given it is much easier to create ".cd" class diagrams, they have a greater adoption. They are also present in all SKUs of VS AFAIK, whereas the UML stuff is in Ultimate / Enterprise only. As such, we decided to invest in the .cd class diagrams and fix the "reverse engineering" after the Roslyn changes. – Bogdan Gavril MSFT Nov 02 '15 at 10:01