Visual Studio 2010:如何从代码生成组件图
我参与了一个正在开发相当长一段时间的项目,并且缺乏设计模型和文档。我们使用的是 Visual Studio 2010 Ultimate。有一个旧的初步 VS 架构模型,我正在尝试对其进行扩展,以从不同的角度展示系统的外观。
虽然我可以很好地生成类图并动态生成序列图,但我却陷入了生成组件图的困境。我想避免自己生成它的痛苦,并希望是否可以有一些简单的过程来在很大程度上反映代码/实现。微调不是问题。
我预计,我可以将解决方案中的程序集作为模型资源管理器中的组件放置。但不能。我还尝试将项目拖放到组件图或将命名空间/类从架构资源管理器拖放到组件图上。
有什么简单的出路吗?
I got into a project that is under development for quite sometime and lacks models and documentation on the design. We are using Visual Studio 2010 Ultimate. There is one old preliminary VS architecture model and I am trying to grow it up to show how the system looks like from different perspectives.
While, I can generate the class diagrams fairly well and generate the sequence diagrams on the fly, I am stuck in generating the component diagram. I wanted to avoid the pain of generating it of my own and wished if there could be some easy process to reflect the code/implementation to a good extent. Fine-tuning is not an issue.
I expected, I could put the assemblies in the solution as components in the Model explorer. But could not. I also tried drag-and-dropping the projects to the component diagram or the namespaces/classes from the architecture explorer on to the component diagram.
Is there any easy way out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要下载并安装 Visual Studio SDK 和 Visual Studio 可视化和建模 SDK,然后创建特定于域的语言解决方案。
不幸的是,这几乎是我能收集到的所有信息,因为我什至无法安装 VS 2010 SDK虽然我确实安装了 VS 2010 Professional。如果您碰巧无法自行安装这里是一个链接,指向 Microsoft 论坛中有人在 ATM 机上遇到同样问题的帖子。目前还没有解决,但不久前才被问到。
编辑:要使用 VS2010 创建 UML 组件图,需要 VS2010 Ultimate。我不太确定您是否需要它来实际安装建模 SDK。不过,我觉得没有必要在我的专业版安装上测试它,而且无论如何你都有终极版。
You will need to download and install the Visual Studio SDK and the Visual Studio Visualization and Modeling SDK then create a Domain-Specific Language Solution.
Unfortunately that is pretty much all Information I could gather, as I cannot install the VS 2010 SDK even though I do have VS 2010 Professional installed. If you happen to not be able to install it yourself here is a link to a post in the Microsoft forum of someone having the same problem atm. It is still unresolved, but was just asked a little while ago.
Edit: For creating UML component diagrams with VS2010 one will need VS2010 Ultimate. I am not quite sure weather you need it to actually install the Modeling SDK also. I dont feel a need to test it on my Professional installation though and you do have Ultimate anyway.