.NET Tips and Tricks

Blog archive

Free Tool: WoVS Quick Add Reference

When I tell people what I like about productivity tools like ReSharper and CodeRush (among others), I always mention their support for automatically adding references and adding imports for namespaces when I type in a class name. The Clarius team, through World of Visual Studio (WoVS), has a free add-in that does that also. But sadly, I was only able to get it to work for C#.

Here's what happens: You type in a class name that Visual Studio doesn't recognize because you don't have the right imports/using statement at the top of your file; or worse yet, you haven't added a reference to the library to your project. You get the red wavy line and the error tooltip says that the type or namespace can't be found.

Here's what you do: Click at the front of the class name to get the error correction dropdown list. Provided you've spelled and capitalized the class name correctly, you'll have a new choice at the bottom of the dropdown list. That new choice automatically adds a reference to the library you need (there may be multiple entries if the class name appears in several libraries) and then goes on to insert the necessary using statement at the top of your file. To put it another way: One click and your code will compile.

The tool is even easy to install -- you can get it from Visual Studio's Extension Manager. The only downsides? As I said, it only works for C# and, I'm told by some international friends, only if Visual Studio is running in English. Plus, of course, I'll no longer know the namespace or library for any class that I'm using. It turns out that I'm OK with that last one.

Posted by Peter Vogel on 12/14/2011 at 4:59 PM

comments powered by Disqus


  • Java on Visual Studio Code Going Cloud Native

    Cloud-native development figures prominently in a new roadmap published by Microsoft's Java on Visual Studio Code dev team.

  • Speed Lines Graphic

    Quantum-Inspired Annealing Using C# or Python

    Dr. James McCaffrey of Microsoft Research explains a new idea that slightly modifies standard simulated annealing by borrowing ideas from quantum mechanics.

  • Visual Studio 2022 v17.1 Preview 3 Improves Web Tools

    Microsoft quietly shipped Visual Studio 2022 v17.1 Preview 3 with enhancements to web tools.

  • Progress Telerik Adds 20-Plus Components for Blazor, .NET MAUI and WinUI

    The R1 2022 release of Progress Telerik development tooling adds more than 20 new components to the Blazor, .NET MAUI and WinUI offerings.

Upcoming Events