简体   繁体   English

Visual Studio类图查看器独立存在

[英]Visual Studio Class Diagram Viewer stand alone

Visual Studio Makes Class diagrams and if we open it in text editor program it is a simple XML . Visual Studio创建类图,如果我们在文本编辑器程序中打开它,则它是简单的XML Surely we can generate that on runtime. 当然,我们可以在运行时生成它。 But the problem is although you have visual studio to see the Class Diagram Generated but what solution is there if we want to deploy application where there is no Visual Studio Installed? 但是问题是,尽管您有Visual Studio可以看到生成的Class Diagram但是如果我们要在没有安装Visual Studio部署应用程序,那么有什么解决方案呢?

  1. Is there any possibility or available plugin or library that can generate Class diagram or UML diagram from XML? 有没有可能或可用的插件或库可以从XML生成类图或UML图?
  2. Can we somehow use Visual Studio Class Diagram to view it on runtime? 我们可以以某种方式使用Visual Studio类图在运行时进行查看吗?
  3. Not Sure but what if we generate xml on Back end and then if possible create Image (png or gif) using some builtin plugin and display that? 不确定,但是如果我们在后端生成xml,然后如果可能的话,使用一些内置插件创建Image(png或gif)并显示该怎么办? (I am really not sure about this idea :() (我真的不确定这个主意:()

I have seen NClass It is very good but a bit complex and it is not developed through XML. 我看过NClass很好,但是有点复杂,它不是通过XML开发的。

I suggest to use PowerToys for Class Designer ( http://modeling.codeplex.com ). 我建议对类设计器使用PowerToys( http://modeling.codeplex.com )。 It improves the Class Designer and allows you to export diagrams to HTML. 它改进了类设计器,并允许您将图导出为HTML。 This way is easy to distribute to any machine. 这种方式很容易分发到任何计算机。

As an alternative, you can take a different path with reflection, in this case you don't need the visual studio class diagram; 作为替代方案,您可以采用反射的另一条路径,在这种情况下,您不需要Visual Studio类图。 the diagrams are generated by inspecting the requested types. 这些图是通过检查请求的类型生成的。 I suggest to read the articles by Sacha Barber ( http://www.codeproject.com/Articles/17823/100-Reflective-Class-Diagram-Creation-Tool and http://www.codeproject.com/Articles/207280/200-Reflective-Class-Diagram-Creation-Tool ). 我建议阅读Sacha Barber的文章( http://www.codeproject.com/Articles/17823/100-Reflective-Class-Diagram-Creation-Toolhttp://www.codeproject.com/Articles/207280/ 200反射类图创建工具 )。 Maybe you can customize his application. 也许您可以自定义他的应用程序。

In Visual Studio Enterprise 2017: 在Visual Studio Enterprise 2017中:

  1. Quit Visual Studio if it is running 如果正在运行,请退出Visual Studio
  2. Start Visual Studio Installer 启动Visual Studio安装程序
  3. Click dropdown list "More" and select "Modify" 点击下拉列表“更多”,然后选择“修改”
  4. In section "Code tools", check the option for "Class Designer" 在“代码工具”部分中,选中“类设计器”的选项
  5. Click button: Modify 单击按钮:修改

Result: now the Class Diagram should load from Solution Explorer as UML. 结果:现在,类图应从解决方案资源管理器作为UML加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM