I just loaded my Visual Studio instance and got the most bizarre test run error. In addition, I found no answers on google. Now that´s surprising!
I found the error by pressing the blue link here:
Which displayed to me this:
Error 2011-06-13 10:20:42 The diagnostic data adapter 'Microsoft.VisualStudio.TestTools.CodeCoverage.CoveragePlugIn, Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' on agent 'TS-WS1180' threw an exception during type loading, construction, or initialization: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Det går inte att hitta filen. File name: 'Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError) at Microsoft.VisualStudio.TestTools.DataCollection.ExecutionPluginManager.LoadAndInitDataCollectorAsync(TestRun testRun, String collectorTypeName, Dictionary`2 dataCollectorCache)
I tried google and all the windows and configuration files I could find to no avail. The only help I got was from the Fusionlog which told me that the test executer didn’t search for the assembly in the PrivateAssemblies folder in which it was located.
LOG: This bind starts in default load context. LOG: Using application configuration file: C:ProgramMicrosoft Visual Studio 10.0Common7IDEQTAgent32.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:WINDOWSMicrosoft.NETFrameworkv4.0.30319configmachine.config. LOG: Post-policy reference: Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: Attempting download of new URL file:///C:/Program/Microsoft Visual Studio 10.0/Common7/IDE/Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage.DLL. LOG: Attempting download of new URL file:///C:/Program/Microsoft Visual Studio 10.0/Common7/IDE/Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage/Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage.DLL. LOG: Attempting download of new URL file:///C:/Program/Microsoft Visual Studio 10.0/Common7/IDE/Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage.EXE. LOG: Attempting download of new URL file:///C:/Program/Microsoft Visual Studio 10.0/Common7/IDE/Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage/Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage.EXE. . TS-WS1180
Strange, strange indeed.
After trying a lot of things, unfortunately, the wrong ones I found that the configuration file the test executer was using, QTAgent32.exe.config was completely and utterly wrong. I had managed to overwrite it in a previous test run and it now contained an integration test config, dang.
Oh well, just replacing it from the VS 2010 cab files solved the problem.
I doubt anyone will find this useful but I had to vent 🙂