My new Blog

Starting from now on I will post on this blog http://www.laurentkempe.com

You might update your reader to use this new rss feed

After almost 7 years spent on weblogs.asp.net I decided that it was time to move my blog to it’s own location. On which I will continue to talk about technical interest I have but also about other things.

Sorry for the annoyance and I hope that you will continue to follow me!


Windows 7, Disk is offline because it has a signature collision

When I switched on today my second hard drive I had the following issue displayed

The disk is offline because it has a signature collision with another disk that is online


Running Diskpart as administrator proved that it was the issue


As you can see disk 2 and disk 4 both have the 00024A91 signature hence the collision.

Following the advise here, I changed the signature of the drive decreasing from 1 unit.


Than I brought back the disk online using Disk Management


And everything went back to normal



VisualSvn, TortoiseSvn and relocating a working copy

Whenever you have to relocate your svn working copy because the svn server url or protocol as changed, you need to use TortoiseSvn relocate. If, like me, you use VisualSvn plugin then you would need to quit Visual Studio and come back to Windows Explorer and TortoiseSvn, right click your project folder then find Relocate command:


Type in the dialog which open the new url of the svn repository, then click Ok.

TortoiseSvn will then do it works and the next time you open Visual Studio you will have your working copy pointing to the new server.

Read the documentation on the following page:

If your repository has for some reason changed it's location (IP/URL). Maybe you're even stuck and can't commit and you don't want to checkout your working copy again from the new location and to move all your changed data back into the new working copy, TortoiseSVN → Relocate is the command you are looking for. It basically does very little: it scans all entries files in the .svn folder and changes the URL of the entries to the new value.

You may be surprised to find that TortoiseSVN contacts the repository as part of this operation. All it is doing is performing some simple checks to make sure that the new URL really does refer to the same repository as the existing working copy.


This is a very infrequently used operation. The relocate command isonly used if the URL of the repository root has changed. Possible reasons are:

  • The IP address of the server has changed.

  • The protocol has changed (e.g. http:// to https://).

  • The repository root path in the server setup has changed.

Put another way, you need to relocate when your working copy is referring to the same location in the same repository, but the repository itself has moved.

It does not apply if:

  • You want to move to a different Subversion repository. In that case you should perform a clean checkout from the new repository location.

  • You want to switch to a different branch or directory within the same repository. To do that you should use TortoiseSVN →Switch.... Read the section called “To Checkout or to Switch...” for more information.

If you use relocate in either of the cases above, it will corrupt your working copy and you will get many unexplainable error messages while updating, committing, etc. Once that has happened, the only fix is a fresh checkout.


NDepend v3 - now 100% integrated in Visual Studio

Patrick just announced on his blog the launch of the new NDepend v3. It is still in beta but very stable. I am testing it for a month now and enjoy very much it’s integration in Visual Studio 2008. I was using it and will continue to use it in our continuous integration server, TeamCity. But getting feedback right out of the developer environment is a very interesting feature.

Read more on Patrick’s blog post, “NDepend v3 is now 100% integrated in Visual Studio

Even on large code base, made of hundreds of thousands of lines of code and dozens of VS projects, Visual Studio is not noticeably slow down by the NDepend v3 addin.

VisualStudio 2010, 2008 and 2005

Simply put, what NDepend v2 does in the Continuous Integration/Build process, NDepend v3 does it live at development-time inside Visual Studio

Multi VS solutions wide-analysis and collaboration

Rich Code Search in VS

Multi CQL Query Edition in VS

Code visualization in VS

Continuous comparison with a base line in VS

Reflector disassembly’s comparison

Deep VS Integration

NDepend Session state preserved


Well done Patrick!


White’s tip for your automated WPF functional tests

When you build automated WPF functional test using White in which you need to open a file through a Windows open file dialog, you will be confronted with the following issue. Windows open file dialog remember the last path with which you opened a file.

So you might have some unit tests that are green for a while which starts to be red for no apparent reasons.

The solution I came to is as this.

First I use Visual Studio, Copy to Output Directory, to copy the needed file to the output directoy in which your software will be started by the unit tests, e.g. for notValidVersionZip.zip


So now I am sure that the needed file is in the same path than the application. I then also need to be sure that when the application start the Windows open file dialog it points to this path. In the past implementation I was just using a filename and was lucky enough the path used by the Windows open file dialog was the correct one.

To get to the correct path is easy. We just navigate to the correct path using the Windows open file dialog in an automated way. The correct path is the path in which the application as been started, so you can get it like that:

  1. /// <summary>
  2. /// Gets the current path.
  3. /// </summary>
  4. /// <returns></returns>
  5. private static string GetCurrentPath()
  6. {
  7.     return Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
  8. }

We have the correct path and we still need to automate the Windows open file dialog to navigate to that path. We can do this like that:

  1. protected void Open(string filename)
  2. {
  3.     OpenButton.Click();
  5.     var openModalWindow =
  6.         MainWindow.ModalWindow("Please choose a Zip file", InitializeOption.NoCache);
  7.     Assert.IsNotNull(openModalWindow);
  9.     var splittedPath = GetCurrentPath().Split(new[] { '\\' });
  11.     foreach (var pathPart in splittedPath)
  12.     {
  13.         openModalWindow.Enter(pathPart);
  14.         openModalWindow.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RETURN);
  15.         openModalWindow.WaitWhileBusy();
  16.     }
  18.     openModalWindow.Enter(filename);
  19.     openModalWindow.Keyboard.PressSpecialKey(KeyboardInput.SpecialKeys.RETURN);
  20. }

Basically we split the path into it different path parts that White will enter into the dialog followed by a enter. Don’t forget to use the method WaitWhileBusy() after each enter, otherwise it will be too fast and sometime your test will not go to the correct path and then will not find the file.

Finally White enter the filename followed by enter and the file is opened.


If you are using like me ReSharper to run your unit tests don’t forget to set it up to run tests from Project output folder.4309993844_8d9e828f8c_o[1]


Automated WPF functional tests using White

I’d like to introduce a tool that I have added for a month or two in my toolset. This tool is White from ThoughtWorks. Here is the description of White:

White: Automate windows applications

White supports all rich client applications, which are Win32, WinForm, WPF and SWT (java).
It is .NET based and hence you wouldn't have use proprietary scripting language. You can use your favourite .NET language, IDE and tools for developing tests/automation programs.
White provides consistent object oriented API for all kinds of applications. Also it hides all the complexity of Microsoft's UIAutomation library and windows messages (on which it is based).
(While WHITE is completely ready to be used, the documentation is still work under progress. Please do point out the areas which needs documentation.)

When I found White with it’s version 0.19, I was a bit skeptical about the state of this piece of software. But it is really ready to be used.

By the way the latest version 0.19 of White supports also Silverlight.

I had the need to automate some functional tests of a WPF application that I am working on. When such an application is growing it becomes more and more difficult to do functional tests manually, so it needs automation.

So what I was searching for was something that would let me write unit tests in C# with NUnit which automate a WPF application. It is not that I don’t want to learn another language but I needed to be efficient so I preferred to use something I knew. And what I have found is White.

I have tested it with the RadRibbonBar for WPF of Telerik and it works just great. btw Thanks to Telerik for the offered license, which my company Innoveo Solutions also ordered now.

If you are starting with automated functional testing I recommend you to read the Functional Testing. It explains step by step how to write automated functional tests with White. The basic can be also used with another tool.

It is funny to see you application running without you clicking around.

I still need to have this run by our build server, TeamCity. I have currently not done any investigation on that point. I plan to have those tests running at least nightly, but I have to see how the unit tests could be started on an environment with a desktop.

C# // Linq

The beauty of C# and Linq

Today I faced the following challenge to solve: return all possible combinations of three source collections.

We are using C# and with Linq it was just so easy.

  1. public List<string> Contexts
  2. {
  3.     get
  4.     {
  5.         var result = from u in SelectedUseCases
  6.                      from c in SelectedChannels
  7.                      from up in SelectedUserProfiles
  8.                      select string.Format("{0}-{1}-{2}", u.Value, c.Value, up.Value);
  10.         return result.ToList();
  11.     }
  12. }

Simple and beautiful!


ClickOnce ISignedCode::Sign returned error: 0x80880253

Tonight we got the following issue on our TeamCity build server which produce different ClickOnce setups :

c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3652, 9): error MSB3482: An error occurred while signing: Failed to sign ..\..\Tests\Output\bin\DeployClickOnce\app.publish\setup.exe
SignTool Error: ISignedCode::Sign returned error: 0x80880253
    The signer's certificate is not valid for signing.
SignTool Error: An error occurred while attempting to sign: ..\..\Tests\Output\bin\DeployClickOnce\app.publish\setup.exe

Checking the certificate used by our project I found that the expiration date was yesterday:


So I had first to create a new test certificate.

Then I had to re-install the certificate on the server, as described in “ClickOnce certificate and TeamCity”. Before installing I had to remove the old one using:

> Psexec.exe -i -s cmd.exe

then running

> mmc

and removing by hand the old certifcate.


Review of 2009 blog posts

Find here a list of all my 38 posts for 2009! In the bold, the posts which got most traffic.













Limit issues with Eclipse when using VisualSVN/TortoiseSVN

In some rare case I have to use Eclipse configured to access our Innoveo Solutions svn server. I also for sure have Visual Studio 2008 with VisualSvn installed which install TortoiseSvn.

Today I faced the following crazy issue, from a file browse window opened through Eclipse, I saw that one file was modified so I did from that file browse window a svn revert using TortoiseSvn which ended to a crazy situation in Eclipse. It was totally messed up.

So to avoid this, I configured TortoiseSvn Exclude Paths not to show me this folder and subfolder with icon overlays:


I hope this will save me from those crazy situations!

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect, certified Scrum Master and Founding Member.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status



This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List