Visual Studio 2010: How to generate component diagram from code - visual-studio-2010

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?

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.
MSDN for VS 2008 DSL
MSDN for VS 2010 DSL (differs quite a bit, therefore both links)
Visual Studio Development Center - DSL
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.

Related

Developing Visual Studio addins for multiple versions of Visual Studio

I've been given the task of developing some extensions for Visual Studio for our internal use. These will have to support a couple of different versions of Visual Studio (VS2008, 2010 and 2012 - VS2005 would be a nice to have but not essential). I'd like to develop these in as consistent a way as possible, reusing as much of the code as possible, while fitting it into the existing project structure for these kinds of tools, which is a Visual Studio 2012 .sln.
What's the best / easiest way of developing this kind of extension? A VSPackage project? Can I make a 2008-compatible VSPackage which is developed in VS2012?
The features I will need for the extensions I'm writing at the moment are pretty basic - I need to create Tools menu commands, possibly a custom toolwindow. My requirements might change later on but I don't need editor adornments or anything like that at the moment.
I saw this question which might seem to be a duplicate, but the answer which was accepted doesn't answer the question, so...
It really depends on what is your extension going to do.
VS2008 does not support extensions (.vsix) and you will need to write VSPackage deployed as msi for it. You also won't have access to many new features introduced in VS2010 (easier editor integration and access to vs services via MEF), but basic stuff such as manipulating solution/project/files should be fine and work on all versions (e.g. using DTE should be ok).
As far as I remember for VS2008 you will also need to obtain a PLK, which is no longer required for 2010 and 2012.
I haven't tried developing 2008 package in VS2012, but you definitely can develop 2010 extension in 2012.
Also remember that VS2008 is .Net 3.5, so your code should use .net 3.5 and version of c# which it supports to be portable.

difference between visual studio 2008 and visual studio 2010

I want to know what is the main difference between vs2008 and vs2010..
means I want to know what is the new functionality added in vs2010.
Well, there's always Microsoft's page about the new features of VS 2010. But you can get a more distilled user perspective describing new features that specific developers really like. There are a number of blog posts about it as well.
If you plan to code a lot with threads, definitely go with 2010. It has great advancements on the profiler and debugger. The profiler especially it's awesome.

Why do Visual Studio solutions need to be upgraded with every release of Visual Studio?

This is easily one of the most annoying "features" of Visual Studio in its history and I don't understand why it exists -- ever.
Why would a CodePlex project need to care what version of Visual Studio I am using?
Off the top of my head, the only thing I can think of is that some versions of Visual Studio might introspect assemblies searching for attributes to determine what to display in "Visual Designers" and "Property Editors". But why would that cause Visual Studio to not be able to open the project and allow me to browse its contents and compile?
It seems to me like Open Source in .NET is somewhat limited by the stupid dependency management exhibited by Visual Studio. In other words, if I am using Visual Studio 2008 and you are using Visual Studio 2010, then we have different solution files.
http://blogs.msdn.com/b/visualstudio/archive/2010/03/15/why-does-visual-studio-2010-convert-my-projects.aspx
Here's an example from the site as to why Visual Studio converts your projects to 2010 format.
For instance, Visual Studio runs
custom tools such as single file
generators for designers in order to
output code representing the changes
made to the designer. Many of these
custom tools are upgraded or
completely replaced in the newer IDE.
During conversion, the IDE knows which
custom tools to replace or upgrade. In
order to make round-tripping work, VS
would need old and new custom tools to
understand each other so as to ensure
that old and new designers can work
side by side. Other than designers,
the following files would also be
affected: resource editors, wizards,
code snippets, item and project
templates, diagramming and modeling
tools, and many more.tools, and many more.
Since 2010 knows about what tools 2008 has, it can convert forward to be compatible with the custom tools 2010 uses. 2008 has no idea about what 2010 is using, how could it? Therefore, it is impossible to convert backwards since it doesn't know what it needs to convert, nor how to.
I believe the purpose of this touches on what you stated in your comments. If you are using 2008 and I 2010 and I compile it, how could you possibly run it again? 2010 is backwards compatible but 2008 has no way to make itself forward compatible.
Thus, by recompiling the project in 2010 I ensure that no 2008 user may mistakenly think they can compile it.

Whats the best visual page designer for .NET web applications?

Im currently working on the GUI for an ASP.NET MVC application using Visual Studio 2005. The visual webpage designer (for the views) is awful.
Any input on what other people use would be most appreciated!
I'd like to advice you to create your markup by hand as everybody else does. Using designers is mostly unprofessional and leads to low quality results.
Visual Studio 2008 was a big step forward over 2005. 2005 was horrible. And Visual Studio 2010 is better yet - the quick snippets can save you a bunch of time once you get used to them.
Having installed and tested several products over the past few days, I have come to the conclusion that Microsoft Expression Studio is probably the best option when it comes to a visual design aid. Its code is clean and compliant, and although fairly basic, it allows you to create your layouts as required.

Upgraded VS 2010 Ultimate - Modeling Project - Layer Diagram freezes visual studio

I just updated VS 2010 from Professional to Ultimate, specifically to gain access to the Architecture Modeling utilities.
After successfully creating a new Modeling Project, I have been unable to create a usable Layer Diagram. Each time the VS designer shows the diagram, VS freezes, requiring a forced close via Task Manager.
I have done a VS 2010 complete repair/reinstall, but continue to have the same issues.
I do have Resharper and Telerink JustCode installed along with some power tools.
If anyone has had similar experiences, I would love to hear how you managed to solve them.
Looks like Telerik is incompatible. Disabling it completely removed the issue. Re-enabled and it returned. It is now disabled and VS 2010 is again working quite well.
Fortunately, I rely more on Resharper, which is quite happy in the presence of the Layer Diagram designer.

Resources