In this article you'll explore the notable features of Microsoft Visual Studio 2010 Professional Edition.
In this article I am going let you know the notable
features of Microsoft Visual Studio 2010 IDE
Professional Edition which hit my eye at a first
glimpse. Currently only the beta versions of Visual Studio
2010 and .NET framework 4.0 are available, but the actual
release is expected sometime in the first quarter of this
Not surprisingly it provides support for the .NET
framework 2.0, 3.0, 3.5 and 4.0. The target .NET framework
SDK can be chosen while creating the project initially.
Here's where you can download the Beta version of Microsoft
Visual Studio 2010
I opened the Microsoft Visual Studio 2010 IDE for the
first time and I was totally astonished by the look and feel
of the IDE, in fact it took me a little while to recognize
it to be Visual Studio. The style was totally changed from
its traditional colors and shapes.
To be frank the readability of the texts were so much
improved, similar to that of the WPF vector based line and
graphics. All the unwanted lines and gradients had been
removed. Even the infamous Visual Studio icon has been
changed too. The screen shot below provides enough
Support for Microsoft F#
Visual F# is a new language introduced by Microsoft along
with .NET framework 4.0 and it is integrated very well for
doing the development in Visual Studio 2010. Visual F# is a
language which supports functional programming as well as
object oriented programming.
The .NET framework is packed with a tool named fsi.exe,
which is useful for running the F# commands instantly which
can be compiled and executed on the fly. To open the tool
open Visual Studio 2010 command prompt and type fsi and hit
Below is the sample F# program:
//First look at F#
// Learn more about F# at http://fsharp.net
//Importing required libraries
//instantiates a Form
let form = new Form();
form.Width <- 200;
form.Height <- 100;
form.Text <- "First F# Program"
let label = new Label()
label.Text <- "This is a Label"
Fig 2.0 shows the output of the above F# program
Using Visual Studio 2010 provides F# projects to be
created, built, debugged and deployed. It also provides good
intellisence support for the language.
Currently there are only three kinds of projects
available in Visual F# (one is Silverlight Library project)
and a project for F# learning as shown in Fig 2.1
Integration of Sharepoint, Silverlight and projects for MS Office
Unlike the previous versions of Microsoft Visual Studio,
the 2010 version come with a tight integration of Sharepoint
project and tools for Office. It offers a wide range of
projects in both categories.
With the help of the Office project, visual studio easily
enables you to write macros and add ins using your favorite
language C#. Below is a sample Word 2007 project.
using Office = Microsoft.Office.Core;
using Word = Microsoft.Office.Interop.Word;
public partial class ThisDocument
private void ThisDocument_Startup(object sender, System.EventArgs e)
//Add code to perform tasks on document startup
private void ThisDocument_Shutdown(object sender, System.EventArgs e)
//Add code to perform tasks on document shutdown
#region VSTO Designer generated code
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
private void InternalStartup()
this.Startup += new System.EventHandler(ThisDocument_Startup);
this.Shutdown += new System.EventHandler(ThisDocument_Shutdown);
In the above code see that the Word interop assemblies
have been included in the class file automatically.
The XAML editor for Silverlight and Windows Presentation
Foundation applications has also been improved a lot like
drag dropping the data binding onto the WPF controls and in
terms of intellisence support.
Easy Zoom-In and Zoom-Out of Editor Text
The zoom in and zoom out feature of the code editor will
definitely be a surprising fact for the developers. You can
easily zoom-in or zoom-out by pressing the Ctrl key and
rotating the scroll up or down as you do with Internet
Explorer or other Microsoft Applications. If you are not
using the mouse, then you can make use of the percentage box
which displays at the left bottom corner of the code
Minimum zoom percentage is 20% and Maximum zoom
percentage is 400%. For people who are not comfortable with
the font sizes of the Visual Studio code editor this feature
is a real bliss.
Navigate To Feature
This is a new search functionality introduced in Visual
Studio 2010 which forms the latest member in the list of
Object Browser, Find Symbol and Find Results.
Follow either of the two ways to open the Navigate To window:
- You can open the "Navigate To" window by
pressing the keys "Ctrl + , " combination, note that the +
also forms a part of the hot keys that is why I have
enclosed them in double quotes.
- The other way would be to go to Edit and select
The navigate to option will search and display the class,
class members and objects used in the solution and will
display the line number along with the file name with
When you double click on the search results, it acts like
a "go to" definition and it take you to the definition of
that result which would be a part of the current
A major reason you would like this feature is that the
search is performed so fast and changes on search text
Search options available:
- You can enter the search text as all in lower case, so
that it will perform a non-case sensitive search. If the
search text contains any upper case letter, then the search
becomes a case sensitive one.
- You can enter "Print s" which will search for code which
has the words Print and s, the blank space is actually
designated to act like an
- You can also perform searches based on Pascal casing and
underscored camel casing like "PMF" would search for a class
or a member with name "
Fig 5.0 shows a sample Navigate To window:
Generating stub classes and members
In Microsoft Visual Studio 2005 and 2008 versions you
would have seen an option like 'Generate Stub Method' which
will generate a
Stub method without any
implementation, I'm sure that it would have been a very
useful one in terms of not breaking the programming sequence
during the process of coding.
In Visual Studio 2010, its one step further that you can
generate Stub classes and even property members as well.
This is really a handy feature.
As shown in Fig 6.0, when writing the code for creating
an instance, the code editor understands that you are
creating a class and it provides the below options.
- Generate class for Employee:
When you click on this it automatically creates a class
file called Employee.cs in the current project. The .cs file
will contain an empty class called Employee.
- Generate new Type
When you click on this option, It provides you with lot
of options for creating the Type by showing the Generate New
Type popup window as shown in Fig 6.1
In the window there are options to choose the access
level to be provided for the new Type to be created, it
should be a class/struct/interface/enum, the project to
which the new .cs file should be added and an option to add
the type to a specified file instead of creating a new
The same kind of flow applies to the properties as well.
Fig 6.2 shows the sample for
member for the Employee class. The option for creating it as
a Field or Property is seen.
Intellisence and Code Snippet Improvements
Visual Studio 2010 intellisence system come with two
kinds of modes they are:
- Suggestion Mode
When you want to type the classes and members before they
are defined in your project, make use of the suggestion
mode. Since it will not highlight the item from the
intellisence list rather it will display the text you have
entered. Below Fig 7.0 is a sample screenshot.
- Completion Mode
This is the classic way Intellisence would work with Visual
Studio 2003, 2005, and 2008. It will insert the highlighted
item from the list in spite of your typed value.
You can use the short cut key SHIFT + ALT + SPACE BAR in
order to toggle between the Intellisence mode. There is also
As you can see in Fig 7.1, now code snippets are
available in the aspx page as well. It is going to be really
useful for the people like me who use the aspx source window
for creating controls. Just enter text<button and double
click it and it will create a button template for you.
As you can see there are a number of code snippets
available which are going to prove handy for web developers.
It doesn't stop with the ASP.NET controls but the code
snippet feature extends to the HTML and Jscript as well.
Debugger Breakpoint Improvements
There are a lot of debugger enhancements available in
Visual Studio 2010. I am listing some of the enhancements
done to the breakpoints feature in the 2010 IDE:
- Labeling the breakpoints:
You can add labels to the breakpoints which can make it
easily identifiable. In order to label a break point Right
click on the break point and choose Edit Labels which will
open the Edit break point labels window. Fig 8.0 shows a
sample window which can be used to edit or create a new
label for the break point.
- Break Point search window
There is a search window for the breakpoints. The short cut
key to open the search window is Ctrl + D + B. Fig 8.1 shows
a sample break point search window.
There is also option to import and export break points to
and from a project. The file should be in xml format.
Code Definition Window
The option 'Go to Definition' is not new to the Visual
Studio 2005 and 2008 users. It was really a useful feature
which helped in viewing the definition of a type or member
in the code editor. But I always felt a little uneasy when I
clicked the Go to definition. 2005 and 2008 IDEs would open
the file separately but going back to the original place had
to be done manually. This is where the Code Definition
window comes into to play in Visual Studio 2010. It will
open the definition code in the same code editor window as a
code definition window. Fig 9.0 shows a sample Code
In order to get to the code definition window click on
the Type or member of the code definition window you want to
see and use Ctrl + W + D. This will open the definition in
the Code definition window as shown in the Fig 9.0
This is altogether a new feature in Visual Studio 2010.
The short cut key for opening the Call Hierarchy window is
Ctrl + W + K. But in order view the content in the Call
Hierarchy window right click on the method and select View
Call Hierarchy. Fig 10.0 shows the Call Hierarchy for the
PrintMessageFirst residing in
You would see two categories listed under the
PrintMessageFirst method in Fig 10.0:
- Calls To '
list the set of methods which calls the
PrintMessageFirst method. In our case it is the
- Call From '
list the set of methods called in the
PrintMessageFirst method. In our case it is the
It doesn't stop there, the hierarchy drill down goes on
Call to Main, Call From Main, Calls To
Calls From WriteLine and
In earlier versions of Microsoft Visual Studio if you
have used a member in quite a few places in your class and
you want to see the places where it has been used the option
would be to use a Quick Find window. But in the 2010 IDE it
has been made more simple and elegant. When you just click
on the member, it highlights all the places where it has
been used with a boxed selection as shown in Fig 11.0.
In the above image just check how the
_messageText has been highlighted throughout the
The features mentioned in this article are related to the
Professional Edition of Microsoft Visual Studio. The Team
System version offers a cool feature for generating the
Sequence Diagram, but it is a little disappointing not to
find it in the Professional Edition. I hope that it gives a
good kick start for exploring the Visual Studio 2010 IDE. I
am sure that this article highlights some important features
of Visual Studio 2010. We will keenly wait for the actual
release of the IDE.