Как сделать диаграмму классов в visual studio 2019
How to: Add class diagrams to projects
To design, edit, and refactor classes and other types, add a class diagram to your C#, Visual Basic, or C++ project. To visualize different parts of the code in a project, add multiple class diagrams to the project.
You can’t create class diagrams from projects that share code across multiple apps. To create UML class diagrams, see Create UML modeling projects and diagrams.
Install the Class Designer component
If you haven’t installed the Class Designer component, follow these steps to install it.
Open Visual Studio Installer from the Windows Start menu, or by selecting Tools > Get Tools and Features from the menu bar in Visual Studio.
Visual Studio Installer opens.
Select the Individual components tab, and then scroll down to the Code tools category.
Select Class Designer and then select Modify.
. moniker range=»vs-2019″ . image type=»content» source=»media/vs-2019/class-designer-component.png» alt-text=»Screenshot of the Class Designer component in the Visual Studio Installer.» lightbox=»media/vs-2019/class-designer-component.png». . moniker-end . moniker range=»vs-2022″ . image type=»content» source=»media/vs-2022/class-designer-component.png» alt-text=»Screenshot of the Class Designer component in the Visual Studio Installer.» lightbox=»media/vs-2022/class-designer-component.png». . moniker-end
The Class Designer component starts installing.
Add a blank class diagram to a project
In Solution Explorer, right-click the project node and then choose Add > New Item. Or, press Ctrl+Shift+A.
The Add New Item dialog opens.
Expand Common Items > General, and then select Class Diagram from the template list. For Visual C++ projects, look in the Utility category to find the Class Diagram template.
[!NOTE] If you don’t see the Class Diagram template, follow the steps to install the Class Designer component for Visual Studio.
The class diagram opens in Class Designer and appears as a file that has a .cd extension in Solution Explorer. You can drag shapes and lines to the diagram from Toolbox.
To add multiple class diagrams, repeat the steps in this procedure.
Add a class diagram based on existing types
In Solution Explorer, open a class file’s context menu (right-click) and then choose View Class Diagram.
In Class View, open the namespace or type context menu and then choose View Class Diagram.
[!TIP] If Class View is not open, open Class View from the View menu.
To display the contents of a complete project in a class diagram
In Solution Explorer or Class View, right-click the project and choose View, then choose View Class Diagram.
An auto-populated class diagram is created.
[!IMPORTANT] Class Designer is not available in .NET Core projects.
Как в Visual studio 2019 установить поддержку UML диаграмм?
Visual Studio 2019 Professional 16.6.3
В шаблонах проектов не могу найти Modeling Projects (средство построения диаграмм).
Что надо установить или изменить, чтобы получить данное средство?
Надо вот это

- Вопрос задан более года назад
- 3072 просмотра
- Вконтакте

- Вконтакте



Johnny Gat, Скриншот с версии Ultimate 2012 Update 2.
В Visual Studio 2019 нет указанных на скриншоте элементов, но есть возможность создавать ClassDiagramm.cd которые очень похожи.



Johnny Gat,
В видеоуроке используют VS 2012 и говорят — изучаем uml диаграммы. Создают Modeling Project -> UML Class diagramm. Картинки я привел.
В VS 2019 этого нет.
Но в VS 2019 я нашел диаграмму классов. По функционалу она очень похожа на uml диаграмму VS 2019.
Это одно и тоже?
Просто для дальнейшего изучения мне нужен этот инструмент. А менять VS 2019 на VS 2012 наверно плохая идея. Продукт скорее всего устарел или будут проблемы с другими расширениями.
Как сделать диаграмму классов в visual studio 2019
namespace ConsoleApplication1
<
abstract class Person
<
abstract public void ShowInfo();
>
class Student : Person
<
public String UniversityName < get; set; >
override public void ShowInfo()
<
Console .WriteLine( "Student, study in " + UniversityName);
>
>
class Developer : Person
<
public String CompanyName < get; set; >
override public void ShowInfo()
<
Console .WriteLine( "Developer, work in " + CompanyName);
>
>
class Program
<
static void Main( string [] args)
<
>
>
>