About the Author

John Bowen is a Lead Software Engineer with InterKnowlogy. In this role he both develops software and provides technical leadership for large scale projects with larger teams, usually in the areas of WPF, Silverlight and Surface. These include projects which have been the subject of Microsoft case studies and received awards for technology innovation. John is also a Microsoft MVP for Client Application Development and provides training for both clients and at community and Microsoft sponsored events across the U.S. John has been writing software since majoring in computer science at the University of Southern California and at Boston University where he graduated in 2001. He has also pursued an interest in computer graphics since high school, where he won awards for both still and motion graphics. Before joining InterKnowlogy he also worked creating software for the printing and health care industries and writing public facing web and ecommerce sites.

Presentation Materials for New England Code Camp 17

Thanks to everyone for coming!

What’s new in Visual Studio 11: Slides | Code
Check the slides for the list of all of the new Visual Studio features we looked at.

Easy Async in .NET 4.5: Slides | Code (for VS11 Beta)
The only code demo we didn’t get to look at can be found in the AddingAsync page, which shows a progression of converting a more complex 2 step data loading process from fully synchronous to fully asynchronous including cancellation and exception handling.

My favorite new features in VS11 Beta

After having a week to work with the new Visual Studio Beta, I’m already missing some of the new features when I need to jump back over to 2010. Here are some of my favorites, in no particular order.

Quick Find

image
This is a frequently highlighted new feature, and I’ve definitely found it useful already as a quick shortcut for getting to almost any function in the IDE. My favorite part of it is that it’s so keyboard focused and allows me to skip reaching for the mouse to do things that I would normally just dig into a menu for. As a longtime SlickRun user, the keyboard shortcut to activate it also feels really natural (SlickRun uses Win+Q, Quick Find is Ctrl+Q) and the fast auto-complete search feels similar too.

Incremental Search feels right again

image
Although much of the new functionality was available previously through the Power Tools, a few of the things that got pulled in finally got that extra polish that makes them just feel right. One of the first Power Tools that I had turned off was the new unified Find box that took over a bunch of different functions and keyboard shortcuts. The big problem I had was the way it handled Ctrl+I incremental search. I use this so frequently that it’s a reflex and there were a few hiccups in keyboard focus that caused me to have to stop and figure out how to get back to the state I wanted to be in in the editor. Now, in the beta, this experience has been smoothed out, and the only noticeable difference from the old Ctrl-I functionality are the new visual cues: the box up top showing what I’ve typed, the extra highlighting of all matches in the current window, but the keyboard experience feels the same, and responds just like I expect.

Navigate To (Ctrl+,)

image
One of the things I miss most when working in a bare instance of Visual Studio that doesn’t have my two favorite extensions installed (CodeRush and ReSharper) is quick keyboard navigation to any type in my solution. The new Navigate To window provides a similar (though not identical) experience, with a search while typing listing of types and members, including camel casing caps shorthand, and instant navigation to the selected item.

Out of process solution load and build

This one is pretty obvious, but I know a lot of work went into this and it’s going to be such a dramatic time and frustration saver. Finally those extra cores are getting used on the big workloads.

TFS Local Workspaces

So many cool things about this, and I’ve only scratched the surface so far, but just the way this has been worked into the UI is really impressive. Like if you need to switch back and forth between Local and Server workspaces, there’s one button to click. Doing a Compare to the workspace version of the file just works the same, but doesn’t need to talk to the server at all, so is much faster. No more worrying about accidentally changing a file from outside VS and getting out of sync – now VS is watching and will pick up the change for you. Just all around a well thought out experience and hits a lot of the big annoyances people have with using TFS source control.

New Diff tool

Finally, the Visual Source Safe compare window is gone. A lot here is similar to other diff tools that you could previously point TFS to for your comparisons, but being built in not only skips that extra configuration, but also gives you the full VS editor. Editing a file right in the compare window with full syntax highlighting, Intellisense, and even instant updates of the compare state feels like magic after so much time spent with the old one. The UI isn’t the only part that’s changed either. TFS auto-merging is much improved too and should cut down dramatically on the number of times you even see the merge window.

Using Fakes for easy unit test stubs and shims in VS11

There are a lot of different ways to do mocking in .NET unit tests, from writing your own mock interface implementations to fully built out commercial frameworks like TypeMock. The Moles Isolation framework from Microsoft Research offered some intriguing possibilities but as a research project has never had the same level of support as a full product. Now the Moles concepts and much of the usage syntax have shown up in the Visual Studio 11 beta renamed as Fakes.

The first step in using Fakes is to add a reference to the new Microsoft.QualityTools.Testing.Fakes assembly in your unit test project. Continue reading

Presentation Materials for NEVB User Group February

Thanks to everyone for coming and all the questions! It was great to get to introduce some more people to Windows 8 along the way too.

Downloads for Previews and CTPs can be found here: http://msdn.microsoft.com/en-us/vstudio/async.aspx

Slides: Async 2012

Async Sample: Demo Code for VS 11 (VB) | Demo Code for VS 11 (C#) | Demo Code for Async CTP in VS 2010 (C#)

Metro Sample: Code for VS 11 (C#) Requires Windows 8 to open in VS

Presentation Materials for Fullerton Code Camp 2012

Additional downloads to try out the demo code:

Download the Visual Studio 11 Developer Preview: http://msdn.microsoft.com/en-US/vstudio/hh127353

Or get the Async CTP for 4.0 and Visual Studio 2010: http://msdn.microsoft.com/en-us/vstudio/async.aspx

Windows 8 Developer Preview for all WinRT/Metro samples: http://msdn.microsoft.com/en-us/windows/apps/br229516

Easy Async with .NET 4.5: Slides

Code: .NET 4.5 Code (requires VS11 Preview) | Same Code for .NET 4 CTP

Windows 8 Metro Code (requires VS 11 on Windows 8 to build)

The Future of XAML: Slides

Code: Sample Metro App (requires VS 11 on Windows 8 to build) | Sample Silverlight 5 App (shows some things that either don’t work or change in Metro)

Visual Studio 11 Solution Upgrading

If you’re an early Visual Studio adopter like me you’ve probably gotten used to running into a similar problem every few years: upgrading your code. Although VS usually handles the job of converting files to work in the newer version, the big problem has usually been trying to go back to the old version. If you’re the only one working with the code that might not matter, but if you work on a team that has a mix of, for example, VS 2008 and VS 2010 Beta clients, the conversion process causes problems for one or the other.

Finally in VS 11 this problem is being addressed. The ultimate goal is to be able to open a VS 2010 solution in VS 11 with minimal conversion and applying no breaking changes to the project or solution files that would prevent it from still opening directly in 2010. There will of course be some restrictions, like not upgrading to .NET 4.5, but in general seems like a pretty reasonable goal.

To see how it’s working so far with the Developer Preview I tried upgrading a few of my own projects, including a 50+ project solution with lots of complications. The good news was that the upgrade process did succeed without preventing VS 2010 from opening the converted solutions that I tried. There were, however, some issues.
Continue reading

Presentation Materials for NE Code Camp 16

Thanks to everyone for coming!

To try out the code we looked at:

Download the Visual Studio 11 Developer Preview: http://msdn.microsoft.com/en-US/vstudio/hh127353

Or get the CTP for 4.0 and Visual Studio 2010: http://msdn.microsoft.com/en-us/vstudio/async.aspx

Easy Async with .NET 4.5: Slides

Code: .NET 4.5 Code (requires VS11 Preview) | Same Code for .NET 4 CTP

Windows 8 Metro Code (requires VS 11 on Windows 8 to build)

Presentation Materials for San Diego Code Camp

Thanks to everyone for coming!

Harnessing XAML Templates: Slides | Code (WPF, SL4, SL5)

Easy Async with Async CTP: Slides | Code

Look at the AddingAsync section for the multi-step conversion from synchronous to async with cancellation and error handling that we didn’t have time to walk through.

Get the Async CTP at http://msdn.microsoft.com/en-us/vstudio/async.aspx