title: How to create a class diagram for class library in VS2017?
body: <p>I have a C# class library project in Visual Studio 2017 that I would like to create a class diagram for. The Class Designer is installed. Looking at the context menu for the namespace or any of the classes in the Class View I see the &quot;View Class Diagram&quot; option and also the button for same on the view's menu bar.</p>
  <p>However, when I click either the button or the context menu item nothing seems to happen! Flipping back to the Solution Explorer view I can see a <code>ClassDiagram1.cd</code> file has been added to the project. Attempting to open this file though results in an error message:</p>
  <blockquote>
  <p>Class diagrams are not supported by this project type.</p>
  <p>Add the class diagram file to a C#, VB or C++ project and try opening it again.</p>
  </blockquote>
  <p>I'd be happy enough to be able to add a diagram myself rather than have it generated if generation is not possible. But I also cannot add a blank class diagram file to the project as that file type does not appear in the file types list in the Add New Item form.</p>
  <p>How can I create a class diagram for classes contained in a class library? Or maybe class diagrams are not available for libraries? If the latter is the case is there any info from Microsoft to A) confirm this and B) explain why classes in a program can be diagrammed but not classes in a library. (I did already spend some time googling this matter but did not find anything specific to class libraries)</p>