Sunday, November 30, 2008

VS.NET 2010 - Call Hierarchy

Every day I use the splendid VS.NET add-in called ReSharper in the development routine. This tool greatly reduces the amount of efforts that are needed to find the syntax errors in the code, refactor the code, search various entities of the code, etc. etc. I don't realize how I can code without using ReSharper.
One of the pretty useful features of R# is "Find usages..." functionality. Right click on the method, property, constructor, type, etc., then select "Find Usages" or "Find Usages Advanced..." and R# shows you the points of code where the selected entity is used. You can find the derived classes of some base type or the implementations of some interface, etc. etc. This is really great feature and it has a lot of options...Now I realize that this feature and R# doesn't provide another brilliant option...
So, sometimes I need to analyze
the convoluted and very complex code to figure out how it works to find the possible flaws or realize the possible solution for the newly required features. Say I am interested in some method("A" method), I want to figure out it's place in the the flow of code execution. If I don't want to debug the code I usually use Find Usages feature if R#. I find the usages of the method A. Let's say method A is called by methods B and C. This fact isn't very informative. Then I need to find the usages of the methods B and C, etc. etc. Then I need to realize the entire picture of the place of method A in the flow of the code execution based on the list of usages of the related methods and believe me, this is not pretty straightforward in the complex code(or I am just retard:))
Anyway, VS.NET 2010 introduced the new feature called Call Hierarchy and this is exactly what I needed for more productive and quick code analysis in the complex projects! Right-click on the method, property, constructor or indexer then select "View call hierarchy" and Visual Studio shows you the entire picture of the selected entity place in the flow of the code execution. It shows the calls to "method A" that I referred to in the previous paragraph and calls from "method A". For every calling or called method VS shows it's invokers and invoked methods. You can navigate to calling or called methods and change the scope of call hierarchy analysis! Here is the screen shot of the call hierarchy of the piece of the code of one of my projects:

I am impressed by this new feature and undoubtedly I will use it every day once the standalone version of VS.NET 2010(outside of virtual machine) is released :)

Thursday, November 27, 2008

VS.NET 2010 - the first look

As I supposed the guest operation system in virtual machine that hosts VS.NET 2010 is Windows Server 2008! It has VS.NET 2008, VS.NET 2010, SQL Server 2008, Office 2008, etc. installed.
It's now clear why you need 75 GB on hard drive to get this heavy virtual PC image :)
The first thing I looked for is documentation for VS.NET 2010. It would allow me looking at new features in VS IDE, C#, etc..and..there is no MSDN available! The only available documentation is the set of walkthroughs that briefly describe the new features. Okay, I briefly read this document..
The first feature that I liked and tried immediately is customizing the VS.NET 2010 Start Page. Start page for now can be any content that is built using WPF. It has no limits - you can add RSS feed, animation, flow documents, etc. in the Start Page. You can bind the VS commands to the elements of start page, i.e. execute any main menu item commands.
The steps that needed for customization are pretty straightforward - create XAML document that contains the start page content, copy it to the certain folder and voila!
Well, I tried that and now my Start Page looks like below

That's all for this brief post:)

Wednesday, November 26, 2008

Visual Studio .NET 2010 installation.

Some time ago Microsoft announced Visual Studio .NET 2010 and shared the pre-release CTP for everyone. Splendid! Awesome! - it was my reaction to these news.Then I found CTP download page and looked at the requirements..What?? 75GB available on hard-drive? Core Duo 2 GHz processor?? Must have a minimum of 2 GB RAM?? Indeed these requirements aren't for VS.NET 2010 itself. They are actually for running virtual machine on which VS.NET 2010 is hosted. I suppose that the guest OS on this virtual machine is Windows Server 2008 at least:)
Well, my machine had :

But I was so excited about VS.NET 2010 as I decided to upgrade my machine so that it satisfies running virtual machine that hosts VS.NET 2010 requirements :)
I never thought that some programming software would lead me to upgrade the hardware..Well, the weird Microsoft way to release CTP's actually led me to that.
Now my machine has:
And I can install VS.NET 2010 for now and learn the new interesting features like dynamic features of C# or parallelism support.
I will keep writing about these things!