Class Diagrams in VS 2017

前端 未结 10 1018
长情又很酷
长情又很酷 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:46

    Woo-hoo! It works with some hack!

    According to this comment you need to:

    1. Manually edit Microsoft.CSharp.DesignTime.targets located in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\Managed (for VS Community edition, modify path for other editions), append ClassDesigner value to ProjectCapability (right pane):

    2. Restart VS.

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

    Bingo. Now you may open this file in VS. You will see error message "Object reference not set to an instance of object" once after VS starts, but diagram works.

    Checked on VS 2017 Community Edition, v15.3.0 with .NETCore 2.0 app/project:

    GitHub issue expected to fix in v15.5

提交回复
热议问题