Cannot add class diagram to my project in Visual Studio Professional 2022

Nigel Zett 0 Reputation points
2024-07-16T13:00:59.7133333+00:00

I have installed the Class Diagram feature but right clicking on a project or class file does not display the View Class Diagram option. If I try to add a class diagram file to the project, the file type is missing from the templates.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,078 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nigel Zett 0 Reputation points
    2024-07-16T15:38:39.58+00:00

    The solution mentioned here fixed the issue for me: https://learn.microsoft.com/en-us/answers/questions/805883/is-there-an-alternative-to-generate-a-class-diagra

    Creating the XML file, pasting the shown markup, closing and reopening gives you a working class diagram. I have saved off a copy of this file to add whenever I need a class diagram in .Net Core. I am surprised this issue has not been resolved in over a year since it was reported - but the work around is pretty simple.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.