čtvrtek 31. března 2011

TFS and UnitTests - QTagent32 crash & "data.coverage' because it is being used by another process"

I made a bug in my code which resulted in never-ending recursion which was produced only while UnitTesting.

When there is recursion in unit test than the QTAgent32 crashes down (this is described here).

But if you commit to TFS than and this commits launches the UnitTests than these will never finish (so if you do not check than you might just have builds running for couple days and new builds in the queue behind).

However when you cancel the build and run a new one, this one will fail, saying:

'data.coverage' because it is being used by another process.

So there is some process which has locked the "data.coverage".
To solve this issue log on the TFS and kill the process VSPerfMon.exe which runs under NT AUTHORITY\NETWORK SERVICE (that should be the account which is running your builds & unit tests on TFS).

pondělí 14. března 2011

Change path of included DLL in Visual Studio 2010

Visual Studio 2010 remembers the previous locations of the DLL, and in some cases prefers the "standard" locations of the assemblies.
In one of our projects we have to add System.Windows.Interaction assembly which you can find in the .NET tab of the Add Reference dialog (well only if you had installed Expression studio before).
But we use Team Foundation Server as Source Control and Continous Integration solution and while this assembly was missing on the TFS server, the "after commit" build did not succeed.

So we took out the reference, copied the DLL to the Source Control and added the reference directly to this DLL. But somehow Visual Studio remembers the original location of the DLL and always points the PATH property of the reference to the original position.

The solution is to change the Project file and add manually the PATH to the DLL file

So instead of:


you can change the reference of the interactivity dll to:


čtvrtek 3. března 2011

SqlServer Management Studio 2008 standalone

It is quite difficult and confusing process to install a standalone SQL Server Management Studio 2008.
After you download the setup file, you will see, that it is a 170mb installation package and when you run the installation you will be provided with a full SQL Server Express Intaller.

So how to go on:

-> SQLServer Installation Center
-> Select: New SQL Server stand-alone installation or add features to an existing installation
-> Setup Support Rules - OK
!!! Add features to an existing instanace of SQL Server 2008 - this would be WRONG choice !!!
-> Select: Perfom a new installation of SQL Server 2008
-> Select in the Shared Features: Management Tools - Basic

So even if you have already SQL Server Express intalled you can not add the Management Studio to the features. You have to pretend that you are installing a new copy of SQL Server!

Topic is covered on this blog