Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.

Sometimes Visual Studio 2008 (Team System Developer Edition - with Team Explorer and TFS Power Tools) crashes (disappearing completely) when running unit tests.

I have not yet tried SP1 for VS2008 - will hopefully try this in the next week or two.

Not really sure what causes this - but have noticed that the following error is written to the windows event log prior to the crash (not at the same time).

Event Type: Error
Event Source: VSPERF
Event Category: None
Event ID: 1406
Date:  22/08/2008
Time:  16:27:18
User:  N/A
Computer: MYPC
Description:
There was an error connecting to the Logger Engine while registering C:\Dev\DEV\Release1\Source\MyWebProject\bin\MyWebProject.dll for coverage.

Initially I thought it was a particular test or peice of target code that caused it, but found that the crash occured at seemingly random moments ie I tried running all tests and it would crash at test number 259 (out of 264), then tried running the first 100 tests and it crashed - then tried the last 20 tests and it crashed-  even tried running 1 test and it crashed.  This was the worst case of this problem - over the past few weeks it (VS crashing/disappearing) would only happen every now and then.

The only work around I've found is to replace or remove the workspace and start again...

  1. If you have pending changes, shelve them first.
  2. Using Source Control Explorer, remove the workspace.
  3. Close the solution in VS.
  4. Within a VS command prompt run the following command to remove all workspaces (if you have many workspaces and only want to remove the one workspace then specify it's name instead of the asterisk used below):
        tf workspaces /remove:*
  5. Use the Source Control Explorer to recreate a new workspace. 
    Note: if you have scripts/macros that reference your original workspace source dir, then it would pay to use the same dir - if you do,  make sure you delete the contents of this dir before reassigning it to the new workspace.

HTH
Tim

Posted on Wednesday, August 27, 2008 9:36 AM C# .NET , ASP.NET , Unit Testing , Dev Env, TFS, MSBuild etc | Back to top


Comments on this post: VS 2008 crashes when running unit tests - VSPERF?

# re: VS 2008 crashes when running unit tests - VSPERF?
Requesting Gravatar...
Try this
Asp.Net Vsts 2008 WebTest UnitTest CodeCoverage Profiling
http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx?SelectedNavItem=Posts&sectionid=9183&postid=9617860
Left by sundara prabu on May 15, 2009 6:50 PM

# re: VS 2008 crashes when running unit tests - VSPERF?
Requesting Gravatar...
This was the worst case of this problem - over the past few weeks it (VS crashing/disappearing) would only happen every now and then
Left by giầy nam on Dec 13, 2012 8:43 AM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net