Monday, 29 June 2009

MS Test Error: Metadata files that belong to projects cannot be edited. If you wish to use this metadata file, please import it into the solution

Visual studio (2008) sometimes gets into a bind. It loses the binding with a testadatafile (vsmdi) and try as you might you cannot reattach it and you get the message:

“Metadata files that belong to projects cannot be edited. If you wish to use this metadata file, please import it into the solution”.

Well there is one proposed solution on msdn but it didn’t work for me. To get round it I dropped the vsmdi from the solution. Added it back using add existing item in the solution designer and then went to the Test | Create a new Test list

image

This allowed me to recreate my test list. since I don’t really use many test lists it was a piece of cake but I don’t recommend this solution if you have legacy test lists and are afraid of losing them.

Tuesday, 9 June 2009

MS Test Error : Test skipped/Test host process exited unexpectedly

I get this occasionally – esp. when I’m killing the tests part way through a debug session. The trick is to kill the VSPerfMon process that hangs around.

Killvsperfmon

Or the way I do it:


c:\>tasklist | findstr /i VSPERFMON
VSPerfMon.exe 6500 Console 1 23,192 K
c:\>kill -f 6500