{"id":5081,"date":"2010-06-16T06:35:10","date_gmt":"2010-06-16T06:35:10","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/bharry\/2010\/06\/16\/visual-studio-modeling-feature-pack-available\/"},"modified":"2024-06-25T11:51:03","modified_gmt":"2024-06-25T18:51:03","slug":"visual-studio-modeling-feature-pack-available","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/bharry\/visual-studio-modeling-feature-pack-available\/","title":{"rendered":"Visual Studio Modeling Feature Pack Available!"},"content":{"rendered":"<p>In a post a week or so ago, I introduced the notion of <a href=\"http:\/\/blogs.msdn.com\/b\/bharry\/archive\/2010\/06\/07\/what-on-earth-is-a-feature-pack.aspx\">Feature Packs<\/a>.\u00a0 Now I get to tell you about the availability of the first one!\u00a0 I intended to post the same day but I sat down to play with the feature pack to make sure I understood what all it could do and I realized that my impressions didn\u2019t quite match reality.\u00a0 I wanted to spend some time with the team making sure I understood how I should be thinking about these abilities.\u00a0 Then between Tech Ed presentations, travel, etc \u2013 it\u2019s now a week later \ud83d\ude41<\/p>\n<p>Last week we released the first Feature Pack called the Visual Studio Modeling Feature Pack.\u00a0 It is an add on to Visual Studio Ultimate for people with MSDN subscriptions.\u00a0 Over time, we\u2019ll add more.\u00a0 We\u2019re working on one for people using the new Visual Studio Test features and one for users of TFS.\u00a0 My hope is that we\u2019ll ship about 3 a year.\u00a0 We\u2019ll see how that unfolds.\u00a0 If you are not a VS Ultimate user and are kind of feeling bummed about not getting anything from this cool new feature pack, check out the Pro Power Tools here: <a title=\"http:\/\/blogs.msdn.com\/b\/bharry\/archive\/2010\/06\/07\/announcing-the-first-visual-studio-pro-power-tools.aspx\" href=\"http:\/\/blogs.msdn.com\/b\/bharry\/archive\/2010\/06\/07\/announcing-the-first-visual-studio-pro-power-tools.aspx\">http:\/\/blogs.msdn.com\/b\/bharry\/archive\/2010\/06\/07\/announcing-the-first-visual-studio-pro-power-tools.aspx<\/a> and take heart that more is on the way.<\/p>\n<p>There are a bunch of cool new things in the Modeling Feature Pack.<\/p>\n<h3>C++ Support<\/h3>\n<p>As you may know, in VS 2010, there\u2019s no support for C++ in our modeling tools.\u00a0 This feature pack includes the first installment of C++ support.\u00a0 It\u2019s not complete but it\u2019s a beginning.<\/p>\n<p>The first part worth talking about is support is dependency graphs (Architecture \u2013&gt; Generate Dependency Graph \u2013&gt; By *).\u00a0 This enables you to create visualizations like the one shown here to easily see the dependencies between classes in your C++ code.\u00a0 Be aware that this only works for dependencies that cross DLL boundaries.\u00a0 It won\u2019t show dependencies within a DLL \u2013 a limitation we plan to remove but still useful even with it.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1108.image_thumb_5183300A.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16384\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1108.image_thumb_5183300A.png\" alt=\"Image 1108 image thumb 5183300A\" width=\"511\" height=\"445\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1108.image_thumb_5183300A.png 511w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1108.image_thumb_5183300A-300x261.png 300w\" sizes=\"(max-width: 511px) 100vw, 511px\" \/><\/a><\/p>\n<p>A cool new feature that\u2019s not just a C++ extension of an existing feature is header file dependencies!\u00a0 How many times have you found yourself crawling header files trying to figure out where something got included?\u00a0 This new header file dependency feature makes it really easy.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/8321.image_thumb_19A87A4E.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16385\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/8321.image_thumb_19A87A4E.png\" alt=\"Image 8321 image thumb 19A87A4E\" width=\"373\" height=\"484\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/8321.image_thumb_19A87A4E.png 373w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/8321.image_thumb_19A87A4E-231x300.png 231w\" sizes=\"(max-width: 373px) 100vw, 373px\" \/><\/a><\/p>\n<h3>Web Site Support<\/h3>\n<p>We\u2019ve added support for the architectural tools to really understand the structure of web sites and the artifacts contained in them.\u00a0 It now understands ASP.NET MVC, various web resources, etc. making it way easier to get a high level view of the structure and dependencies in your web app.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/6560.image_thumb_5E8D35E8.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16387\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/6560.image_thumb_5E8D35E8.png\" alt=\"Image 6560 image thumb 5E8D35E8\" width=\"632\" height=\"219\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/6560.image_thumb_5E8D35E8.png 632w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/6560.image_thumb_5E8D35E8-300x104.png 300w\" sizes=\"(max-width: 632px) 100vw, 632px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/5315.image_thumb_5550FAA7.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16388\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/5315.image_thumb_5550FAA7.png\" alt=\"Image 5315 image thumb 5550FAA7\" width=\"550\" height=\"273\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/5315.image_thumb_5550FAA7.png 550w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/5315.image_thumb_5550FAA7-300x149.png 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>UML Class Diagram Code Generation<\/h3>\n<p>In VS 2010, we did not include any capability to generate code from diagrams.\u00a0 With the feature pack, we can now generate code from class diagrams.\u00a0 Imagine that I had designed some classes like this:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_50A25887.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16389\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_50A25887.png\" alt=\"Image 1586 image thumb 50A25887\" width=\"641\" height=\"484\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_50A25887.png 641w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_50A25887-300x227.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/a><\/p>\n<p>I\u2019ve now reviewed the design with everyone and I\u2019m ready to start writing code.\u00a0 What do I do?\u00a0 Well in VS 2010, you Project \u2013&gt; Add \u2013&gt; Class and start typing.\u00a0 With this new feature pack, we make it a little easier.\u00a0 You can right click on the diagram and choose Generate Code.\u00a0 You\u2019ll get nice auto-generated code like this:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_02B98305.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16390\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_02B98305.png\" alt=\"Image 1586 image thumb 02B98305\" width=\"504\" height=\"587\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_02B98305.png 504w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/1586.image_thumb_02B98305-258x300.png 258w\" sizes=\"(max-width: 504px) 100vw, 504px\" \/><\/a><\/p>\n<p>It\u2019s a nice typing saver.\u00a0 The big limitation that I want to point out here is that although we already support generating a UML diagram from code and now we support generating code from a diagram, we don\u2019t yet support round tripping.\u00a0 The code you generate from a diagram will always look like this template.\u00a0 There\u2019s no way to get it to update a class that you generated the diagram from in the first place.\u00a0 Think of this just as a typing saver when you are doing logical design of classes and then you are ready to start coding.<\/p>\n<p>Maybe you don\u2019t like the format of the code it spits out or you want to add some more to it.\u00a0 Check out the T4 templates in<\/p>\n<p>%LOCALAPPDATA%Microsoft\\VisualStudio\\10.0\\Extensions\\Microsoft\\Visualization and Modeling Feature Pack\\1.0\\Templates\\Text<\/p>\n<p>Those templates control the code that is generated.\u00a0 You can tweak them to get what you want (though please be careful to save the originals in case you decide you don\u2019t like what you create :)).<\/p>\n<p>A few more comments on limitations.\u00a0 For now, you can only generate C# class code.\u00a0\u00a0 I think you could create T4 templates for VB and\/or C++ but I haven\u2019t tried it.<\/p>\n<h3>Layer Diagram Validation Extensibility<\/h3>\n<p>One of my favorite features in VS 2010 is layer diagrams and the ability to enforce that my code corresponds to my layer architecture as part of the build.\u00a0 We\u2019ve been getting feedback that people would like to extend the layer diagram with new commands, gestures (double click, drag\/drop) and enforce additional rules as part of this process.\u00a0 This Feature Pack introduces extensibility that allows you to do just that.\u00a0 You can create new extensibility projects with these project templates.\u00a0 Note, you will need to install the VS SDK to do so.\u00a0 You can go to Tools \u2013&gt; Extension Manager and search for Visual Studio SDK to find it.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7752.image_thumb_797D47C3.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16391\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7752.image_thumb_797D47C3.png\" alt=\"Image 7752 image thumb 797D47C3\" width=\"644\" height=\"327\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7752.image_thumb_797D47C3.png 644w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7752.image_thumb_797D47C3-300x152.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><\/p>\n<p>When you go to get the Feature Pack, you will notice that there is also a \u201cVisualization and Modeling Feature Pack Runtime\u201d.\u00a0 This component is needed for someone to run the extensions you build.\u00a0 The reason they are packaged separately is that using the modeling Feature Pack requires and MSDN subscription whereas using the extensions you build with it does not.<\/p>\n<p>Links from Work Items to Models<\/p>\n<p>In VS 2010, we added the ability to create links from models to work items, however, we didn\u2019t have a way to link from work items back to model elements.\u00a0 This feature pack adds the ability.\u00a0 You can read details on how to enable it here: <a title=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff657802.aspx\" href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff657802.aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/ff657802.aspx<\/a><\/p>\n<p>Once you install, you can link to a model element just like any other work item link type<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7266.image_thumb_27E72C8A.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16392\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7266.image_thumb_27E72C8A.png\" alt=\"Image 7266 image thumb 27E72C8A\" width=\"515\" height=\"484\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7266.image_thumb_27E72C8A.png 515w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7266.image_thumb_27E72C8A-300x282.png 300w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2010\/06\/7266.image_thumb_27E72C8A-24x24.png 24w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/a><\/p>\n<p>It\u2019s important to understand how this works.\u00a0 To create a link, you need to have the solution containing the model open in the in IDE.\u00a0 The linking process will create a uri to the model element.\u00a0 You\u2019ll want to make sure that the project is checked into TFS because when someone goes to open the model element through the link, it will only work if the solution containing the model is mapped into a workspace on the machine that the user opening it is using.<\/p>\n<h3>XMI Import<\/h3>\n<p>This release enables XMI 2.1 import which makes it easier to bring UML compliant documents into Visual Studio.\u00a0 For now you will only be able to important documents targeting the subset we support.\u00a0 You should expect us to add more document types in future releases of the product.<\/p>\n<p>This is our first feature pack and there\u2019s some very cool stuff in here.\u00a0 As I said at the top, our plan is to do a few a year and I expect we\u2019ll get even better at them as time progresses.<\/p>\n<p>Please let me know what you think.<\/p>\n<p>Brian<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a post a week or so ago, I introduced the notion of Feature Packs.\u00a0 Now I get to tell you about the availability of the first one!\u00a0 I intended to post the same day but I sat down to play with the feature pack to make sure I understood what all it could do [&hellip;]<\/p>\n","protected":false},"author":244,"featured_media":14617,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[4],"class_list":["post-5081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>In a post a week or so ago, I introduced the notion of Feature Packs.\u00a0 Now I get to tell you about the availability of the first one!\u00a0 I intended to post the same day but I sat down to play with the feature pack to make sure I understood what all it could do [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/5081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/users\/244"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/comments?post=5081"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/5081\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media\/14617"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media?parent=5081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/categories?post=5081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/tags?post=5081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}