I'm trying to run a unit test project under Visual Studio 2008. When running the test, Visual Studio tries to open the Test View and then crashes ("Microsoft Visual Studio has encountered a problem and needs to close.")
In the error details, the only meaningful information is "Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore", which hints that Visual Studio is somehow trying to interact with a TFS server.
I tried connecting Visual Studio to another TFS Server, then running exactly the same test. This time, the test succeeds.
However, I need to run the test while connected to the other TFS server, because this is where my project is. Is there a way to prevent Visual Studio from trying to interact with TFS while running a test? Why does it even need to connect to TFS to run a local test?
Also note that I was able to reproduce the same problem by creating a new project, with a very basic unit test:
[TestClass]
public class UnitTest1()
{
[TestMethod] public void CanRunUnitTestWithoutCrashingVisualStudio()
{
}
}
This solution is not in source control, but if I connect to the problematic TFS server (in Source Control explorer), then it starts crashing Visual Studio. But if I disconnect from TFS, or connect to another TFS server, then it works correctly.