I'm going to the Microsoft ALM Summit in Redmond


Yay! I just confirmed my flight and hotel reservations for the Microsoft ALM Summit in Redmond. I'll be coming a little early (flying in on November 11), so if anyone wants to meet up before the main event, drop me a note :).

FxCopContrib project and DoNotIgnoreResultOfImmutableMethods custom rule


Already a month ago I needed a place to store the code of the FxCop rules I was working on. I ended up at Codeplex, not only because they offer native TFS integration, but also because I hope others will join in on the effort.

As of this moment, the number of rule ideas is growing faster than the number of implemented rules, but some might argue that is a good thing :).

One of the rules I like most (and has dug up a few bugs in my other code already), is a rule which flags calls to methods on immutable types, but subsequently ignores the outcome.

Have your Custom CodeAnalysis rule integrate properly with Visual Studio


After porting the MSOCAF rules to FxCop 10, I noticed that you can't use the "Suppress in Source" option. Only the option "Suppress in Project suppression file" is available. Another problem with the global suppression is that it isn't scoped to a type or method, basically turning off that rule for the whole assembly. We don't want that!

As there is close to no documentation available on CodeAnalysis and FxCop, I looked at the difference between the MSOCAF rules and the standard Code Analysis rules that ship with Visual Studio 2010.

It turns out that to get the 'Suppress in Source' option to work, you must pass a Node to the Problem constructor. Setting the SourceContext manually or setting the filename and position won't allow you to suppress in Source.

Find the ID and GUID of any menu item in Visual Studio

When writing an extension to Visual Studio (or in my case to Team Explorer), you need to know the ID and GUID for context menus, tree's, etc. There is a setting in Visual Studio, which you can activate to get access to a debug window which contains exactly what you'll need. Most of it is explained in this blog post.

But you will need to make a few changes to make it work in later versions of Visual Studio.

For Visual Studio 2008:
Windows Registry Editor Version 5.00
For Visual Studio 2010:
Windows Registry Editor Version 5.00

Storing your TFS passwords for TFS servers in another domain


Working for a lot of different customers from my development laptop I've always wanted that little "Store my password" checkbox on the TFS login box, but somehow it's never there when you need it the most.

Turns out you can use the Windows Credentials Store to save your password. Today I found this little gem on the Codeplex docs while adding the re-targetted MSOCAF rules to Codeplex.

And if you're wondering what kind of account you should add, it is a Windows Account.

Search This Blog


Most Reading