Class Diagrams in VS 2017

前端 未结 10 1015
长情又很酷
长情又很酷 2020-12-04 08:10

I have been using VS 2015 and like the Class Diagram item. I recently upgraded to 2017 and can\'t seem to find the Class Diagram item. Anyone know how I get to it?

10条回答
  •  不思量自难忘°
    2020-12-04 08:29

    A further note on Dmitry's 2017 answer. I opened up

    C:\Program Files (x86)\Microsoft Visual 
    Studio\2017\Community\MSBuild\Microsoft\VisualStudio\Managed\ 
    Microsoft.CSharp.DesignTime.targets 
    

    and went to the element. I already had this:

    
    

    with ClassDesigner already there, and yet I was still unable to drag items to my hack-made Diagram.cd using the XML editing method Dmitry mentioned (

    Manually create text file, say MyClasses.cd with following content:

      MinorVersion="1">
    >      
    

    ). But when I took off the semicolon off 'ClassDesigner' in that element then reopened Visual Studio, voila, I was able to drag classes from my Solution Explorer to my Diagram.cd window.

    So in conclusion, this element in Microsoft.CSharp.DesignTime.targets worked:

    
    

    I am using VS 2019, version 16.1.5.

提交回复
热议问题