Taking Visual Studio 2010 on a Run Around the Block

This weekend, I got a chance to play with Visual Studio 2010 doing some real work. I was told there was a new assignment to rip an incoming financial file that had to be done over the weekend. So I decided to sit on the bleeding edge and use Visual Studio 2010 for my development.

I stoked up Visual Studio 2010 on my laptop and targeted for 2.0 (with the exception of the test project, which I left in 4.0 (just as a test). Here are my findings:

  • You CAN target 2.0 and leave the test targeted at 4.0. I was surprised this worked, actually, despite the ability to have multiple frameworks in a single “project”. Worked flawlessly, although you do get a warning that you are targeting two versions.
  • I love the new TDD bits. I am still not sure I like the default behavior of dumping the class in the test project, but I still have yet to read Mary Poppendeick’s Lean Software Development. I did create the classes in the test project, however, per the lab doc for VS 2010:

    As an important side note, TDD purists will use the Smart Tag approach, generating the code directly in the same location where they are currently working. This subtle design approach encourages you the developer to make your fundamental design choices as late in the process as possible.

  • The Intellisense additions are wonderful. Here are a couple of notes:
    • Intellisense speed is incredible. It picks up very quickly
    • The new Intellisense will pick up if you type a word in the middle of the variable name, making it easy, for example, to work with developers still stuck on Hungarian Notation.
    • Suggest mode is a Godsend when you are typing things in before the objects are created (TDD), as you can type through without having it actually replace stuff. I am not fond of having to remember to hit ESC every time I type in a new variable. 🙂

There are a couple of things I need to research.

  • When running a test, I saw no easy way to right click and actually run the test. There were options that I thought might run the test, but they did not. Have to research this, or figure if I can get Test Driven .NET running in the new IDE. 😉
  • How do you turn on Code Coverage in VS 2010? Another research topic. Unlike the VS 2008 version, where you simply open the Code Coverage bits in the Properties, and then select assemblies to cover, you have to go through some extra steps. I thought I had it turned on, but clicking on the Code Coverage icon in the test results window yielded NADA.

Overall, other than the Microsoft tendency to keep moving the cheese (much like Walmart keeps moving items to get you exposed to new products?), I am very impressed with Visual Studio 2010 beta 2. I could not say as much for VS 2010 beta 1 or some of the CTPs, but things are progressing along nicely.

One thing I did notice. Despite targeting 2.0, you can use new language syntax “features” and have them compile to 2.0. As an example, I coded all of my properties like so:

public string Property1 { get; set; }

Taking this back to Visual Studio 2005, the code would not compile. It was easy enough to fix, but you cannot easily move code files back to the older versions of Visual Studio without some code changes to older syntax. Now, this is not stating that targeting 2.0 will not stop you from adding 4.0 framework references, as it does. You cannot add a 4.0 reference to a 2.0 project.

One thing I would still like to see is clean up of using (Imports for you VB users) statements when you “back target”. I get a bit tired of removing uisng System.Linq; when I forget to target when creating a project. It is minor, but it would be nice if the IDE could look at using statements in the project when you change targeting. I will have to hit connect and finally suggest this.

Peace and Grace,

Twitter: @gbworld


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: