简体   繁体   English

Visual Studio 2015从代码生成UML

[英]Visual Studio 2015 generate UML from code

  • Windows 10 64-bit Windows 10 64位
  • Microsoft Visual Studio Enterprise 2015 Version:14.0.25431.01 Update 3 Microsoft Visual Studio Enterprise 2015版本:14.0.25431.01更新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. 我在www中找到了一些信息,告诉他们“简单地”从现有代码生成UML。

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. 在顶部Menu是一个带有Architecture的部分,我可以在那里创建新的 UML图,但是我无法导入项目所具有的类。 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. 在所有其他论坛条目中,他们谈论的是一个Architecture Explorer ,您可以在其中简单地拖放所需的类,并自动创建依赖项,但在我的情况下,此视图缺失。

If you have some good advise how to document the software differently, you're welcome. 如果您有一些很好的建议如何以不同方式记录软件,欢迎您。

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" 然后,通过拖动实体类并右键单击几个属性并选择:“显示为关联”,您可以相当轻松地创建域模型

To view UML diagram of your project, make right-click on your project and select View->Class diagram. 要查看项目的UML图,请右键单击项目并选择View-> Class diagram。 Auto-generated UML of your project will be opened 将打开项目的自动生成的UML

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM