Published: 24 Dec 2009
By: Hima Vejella

In this article HimaBindu Vejella explains IDE enhancements in Visual Studio 2010 and .NET Framework 4.0.

Contents [hide]

Visual Studio 2010 and .NET Framework 4 IDE Enhancements Series

  • Part 1 In this article HimaBindu Vejella explains IDE enhancements in Visual Studio 2010 and .NET Framework 4.0.
  • Part 2 In this article I am going to cover Multi monitor support, Multi targeting, Parallel Development, Side by Side execution, Backward compatibility and SqlServer 2008 integration.
  • Part 3 In this article I am going to explain Add Reference enhancements for developers, Windows 7 support for developers, Share Point 2010 enhancements , Office Business Application Support, Cloud Development, Document Map Margin and Visual Studio 2010 Tips.
  • Introduction to VS2010

    I have downloaded VS2010 Beta, code name "Hawaii" and I've been playing with it since October. The IDE itself has tremendous features, that I wanted to share with the community. The .NET Framework is upgraded to version 4.0 along with version 10 of the IDE.

    Visual Studio IDE is an Integrated Development Environment tool that is used for developing applications using the new .NET Framework 4.0. It is compatible with the previous frameworks such as .NET Framework 3.5, .NET Framework 3.0, NET Framework 2.0. Following are some of the applications we can develop using the .NET Framework 4.0.

    • Console Applications
    • Windows Forms applications
    • Windows Services
    • WPF Browser applications
    • WPF Applications
    • Web Applications
    • Web Services, Ajax enabled Web Services
    • Dynamic Data entities Web Applications
    • Dynamic data LINQ to SQL Web Applications
    • Office Applications
    • Reporting applications like crystal reports
    • Cloud Services using Windows azure tools
    • SharePoint projects, Business Data Connectivity model and workflow applications
    • Sliverlight applications
    • WCF Services, Ajax enabled WCF services
    • Workflow console and workflow service applications
    • CLR Console applications using VC++
    • MFC and win32 applications
    • Data Tier Applications and advanced database applications.

    We can create some of the above mentioned applications like console, windows forms, and windows services etc, using previous versions of the IDE. But the advantage of using the new VS2010 IDE is that we can make use of VB 10.0 or C# 4.0 and the new IDE features. We can achieve the same results using previous versions too, but installations and patches are required for some of the applications. The effort we put and the amount of time that we spend is minimized in VS2010. Now everything comes built-in and all the plumbing is done by Microsoft.

    VS2010 supports a lot of custom templates that are available online. We can download and work with them depending on requirements and flexibility. These are available under the templates section in the Visual Studio Gallery.

    We can go to Extension Manager and check all the installed extensions. This can be done by going to Tools->Extension manager to see what is available and what we have installed.

    This is a useful feature for checking what extensions we installed and uninstalling them. Extension manager settings are in Tools->Options->Environment->Extension manager.

    Code Improvements

    The new IDE uses Windows Presentation Foundation technology to provide integrated support and to help with the code written. The IntelliSense engine is more dynamic, sharp and reacts faster. It's responsible for the majority of the IDE features. IDE architecture is improved to fix issues in previous versions .This is a great help for the people who deal with large codebases.

    These are the important changes in code improvements I'm going to explain each of them in detail.

    Code IntelliSense

    The first change we notice in the IDE is IntelliSense. VS2010 IntelliSense search now uses 'contains' as opposed to 'starts with'. When we type a particular word, it searches for the related classes, types, events, methods, properties and gets all of them. This is useful for easily searching classes, types and keywords. Pascal Casing IntelliSense, i.e. the ability to search for multi word phrases by single abbreviation, is built-in. The single word abbreviation needs to be strictly capitalized in order for the IntelliSense engine to understand that it's a Pascal Case IntelliSense.

    Consume-first Development

    This is the new enhancement that is only included as part of VS2010 IDE in IntelliSense functionality .This feature is really useful in test driven development (TDD) i.e. consuming API first. Instead of forcing us into a class that already exists, as opposed to VS2008, VS2010 IDE accepts what we typed when we pressed the space bar. This can be achieved with the Ctrl+Alt+Space shortcut to toggle the consume-first mode. Once this mode is turned on, it will stay until we press Ctrl+Alt+Space to open the IntelliSense window again. Code generation is also done with generate other dialogue box .The main idea is to consume classes, types, methods before the definition of a particular class, type or method. It gives us the option to generate the class. We can add a new type and specify where the class needs to be added in the project.

    Code Generation using Generate New Type

    If we directly generate the class we don't know where the class will be created in our project. We can generate code using 'Generate new Type' and specify a location where code will be generated. We can specify the class/interface/struct/enum name along with access specifiers. If we have multiple projects and we want to generate code in a particular project files, this feature is really useful for developers.

    Call Hierarchies - View Call Hierarchy

    We can toggle between Control+K and Control+T to make use of this feature. Keep the cursor position on the method you want to check, right click and click the View Call Hierarchy option. This gives all reference calls to a particular method, like where it's called, as well as all calls from a particular method. This helps in analyzing how a particular method or entity is passed in and out of the code section. This is a nice feature to understand the code of a large project where we need to debug and check the flow.

    Advanced Search Option - Navigate To

    Press control+ comma to navigate to search options. This feature searches for all methods, variables or events that we typed in the Navigate to window. Search here is dynamic, as it works while we type the character.

    Pascal case search is also supported here. The IntelliSense engine is more advanced since it supports Pascal casing all the time. This minimizes keyboard strokes and saves time because you just have to remember a few shortcuts or 3 characters. When we click on the individual items, the cursor will be positioned to the corresponding page location where the particular method or event is called. This feature is much flexible and very useful for large scale or migrating projects. There is an option to hide external items as well.

    Highlight References

    Highlighting References is a simple and very easy concept that helps to understand a scoped piece of code easily. Place and drag the mouse over the property, variable or method or word you want to navigate to. The related words are activated automatically after a slight delay - all references to the symbol under the cursor are highlighted. Navigating to the next reference or previous reference is done by pressing Ctrl+Shift+Up Arrow or Down Arrow, respectively. It infers which overloads bind to the current selection: it's not just a pure text match.

    Summary

    We have walked through the most important enhancements in VS2010 for developers. I hope you are excited to work with it. In my next article I will be covering more features.

    References

    Visual Studio 2010 and .NET Framework 4 IDE Enhancements Series

  • Part 1 In this article HimaBindu Vejella explains IDE enhancements in Visual Studio 2010 and .NET Framework 4.0.
  • Part 2 In this article I am going to cover Multi monitor support, Multi targeting, Parallel Development, Side by Side execution, Backward compatibility and SqlServer 2008 integration.
  • Part 3 In this article I am going to explain Add Reference enhancements for developers, Windows 7 support for developers, Share Point 2010 enhancements , Office Business Application Support, Cloud Development, Document Map Margin and Visual Studio 2010 Tips.
  • <<  Previous Article Continue reading and see our next or previous articles Next Article >>

    About Hima Vejella

    HimaBindu Vejella MVP in ASP.NET since 2006, .NET Rock Star, Speaker, Author, DotnetUserGroupHyderabad Lead, Moderator at syntaxhelp has 9+ years of expe...

    This author has published 5 articles on DotNetSlackers. View other articles or the complete profile here.

    Other articles in this category


    Android for .NET Developers - Location and Maps
    In Windows Phone and iOS getting the current position of the device in terms of latitude and longitu...
    Android for .NET Developers - Using Web Views
    In this article, I'll show a native app that contains a web-based view. The great news is that HTML ...
    Android for .NET Developers - Building a Twitter Client
    In this article, I'll discuss the features and capabilities required by an Android application to ta...
    Ref and Out (The Inside Story)
    Knowing the power of ref and out, a developer will certainly make full use of this feature of parame...
    Developing a Hello World Java Application and Deploying it in Windows Azure - Part II
    In this article we will see the steps involved in deploying the WAR created in the first part of thi...

    You might also be interested in the following related blog posts


    Video: CodeRush Metric Shader Plugin read more
    Mark Miller Will Beat You With a Guitar! read more
    My History of Visual Studio (Part 10, final) read more
    My History of Visual Studio (Part 8) read more
    My ASP.NET MVC stack and why I chosen it read more
    My History of Visual Studio (Part 6) read more
    F# in VS2010 read more
    StreamInsight read more
    Sneak Peek: ASP.NET Time Edit Control read more
    Sneak Peek: ASP.NET Splitter Control read more
    Top
     
     
     

    Discussion


    Subject Author Date
    placeholder NIce Article! Hitesh Kapoor 12/25/2009 11:04 AM
    Thank you Hima Vejella 12/25/2009 11:10 AM
    placeholder It is really a very nice and useful article Raghav M 12/25/2009 7:46 PM
    Very Informative Vejella Sukanya 12/27/2009 3:58 AM
    placeholder Nice one Prasad a 12/29/2009 3:19 AM
    Good one Passion Tech 12/30/2009 1:41 AM
    placeholder Impressive and Informative Pranav Ainavolu 12/30/2009 2:31 AM
    Good to know Vamshi Srinivas 12/30/2009 2:38 AM
    placeholder Rating System is not usr friendly Vamshi Srinivas 12/30/2009 2:41 AM
    Reg Rating system Hima Vejella 12/30/2009 2:45 AM
    placeholder Wow Visual Studio 2010 Suresh Mediboyina 12/30/2009 3:36 AM
    very using full article Suresh V 1/2/2010 7:51 AM

    Please login to rate or to leave a comment.