Thursday, November 20, 2008

Case of duplicate VSMDI files – resolved?

If you are using VSMDI files, chances are you know what I am talking about. You get all your test lists defined, tests running, sun is shining and suddenly, out of nowhere second and then third VSMDI files get created.

The problem is pretty irritating one, as can be witnessed by some angry posts at MSDN. The problem also seems to be a complicated one because it can happen in multiple scenarios, and some of those scenarios are not readily reproducible. The reproducible scenarios are:

  • The solution with VSMDI file is not under version control, but VSMDI file is read-only. When Visual Studio needs to change it, new file (with suffix 1, 2 etc.) is created
  • The solution with VSMDI file is under version control, and VSMDI file is checked out with exclusive lock. When Visual Studio needs to change it, automatic check out is attempted and fails, and new file (with suffix 1, 2 etc.) is created

Other scenarios appear to involve Test List editor tool window, and not reproducible in 100% of cases.

So you’d say – that’s all very interesting, but how about fixing that? There are several ways to go about it.

First of all, scenarios involving read-only VSMDI files should be easily fixed (by removing r/o flag). In case of source controlled solution, there is KB support article 957358 detailing steps to avoid that.

Secondly, there is piece of advice that I really like (courtesy of Chris Menegay) – always modify VSMDI files by double-clicking the file in Solution Explorer (and not by using Test List editor etc.). From my experience, it appeared to work magically.

And lastly, most of these scenarios are fixed in Visual Studio 2008 SP1. If you have installed service pack, and still observe duplicated files appearing, folks at MS would be every interested to know about it. Leave a comment or drop me a line.

In next version of Visual Studio, VS 2010, the pain associated with VSMDI files should go away as there is a whole lot of changes in the way testing is done.

Tuesday, November 18, 2008

StyleCop November news

Just a couple of interesting and very useful articles related to StyleCop.

First, Jason Allor writes about how to gradually integrate StyleCop into legacy projects. The biggest problem with StyleCop (and FxCop for that matter) when you start enforcing rules on legacy projects, is what to do about all legacy code that is not compliant. Well, for StyleCop there is an easy way out (since it operates on source code files) - it is possible to edit C# project file and so all legacy files are ignored during the analysis.

Another interesting project from Howard van Rooijen is integration of StyleCop with ReSharper. Not only it displays StyleCop warnings the same way it does ReSharper warnings, it also provides automated correction options. I am not a big fan of automatic fixes for static code analysis issues (since there should be some thinking involved in most cases), but with StyleCop kind of warnings this is very useful. Not many people fancy removing spaces or changing indentation manually – unless you get paid by the hour that is :)

Get ready for Lab Management

I was going to write about it for a while, but got swamped with relocation and such. But luckily, somebody else written a post summing it up nicely, so I can just put up the link :)

So here – the technology I wanted to write about is something absolutely new that is coming with Visual Studio Team System 2010. Lab Management is going to change the way you do the testing in the enterprise, and it is one technology you might want to follow closely.

Think about all the time and effort you could save if you could manage groups of Virtual Machines at once, create new VMs on the fly, and establish association between bug and problem VM image (and since the image will be exactly in the same state as at the time of the bug occurrence, you will get yourself a repro right at your fingertips).

There are alternative products on the market (such as VMWare Lab Manager), however the potential strength of MS offering is in the integration between Lab Manager, Hyper-V and Team Foundation Server (and the product will also provide integration with VMWare ESX offering in addition to Hyper-V).

To read more about why Lab Manager idea is an awesome one and what’s coming, read this post at Microsoft Visualization Team blog.

Saturday, November 15, 2008

Changing colors

Just a short personal announcement – I have removed MVP logo from my blog. Why? You have guessed correctly – I have joined the very company that awarded me MVP status.

Does that mean that my blog will change direction? Well, somewhat, since I will be working in Windows division on internal testing technologies. But I am still very much interested in ALM at large & Team System. So stay tuned!