1

我们正在使用具有 VS 2012 的 TFS 构建服务器,并且团队项目具有单元测试。以前我们有 2010 年,一切都很好。我们重新安装了服务器,现在我们使用的是 VS2012。当单元测试在构建中开始时(根据 buildlog)MSTest.exe 在 Visual Studio 10 文件夹下执行。单元测试无法启动 - 日志中没有错误,但它只是挂起。

如果我手动运行命令(来自日志文件的片段)并用 Visual Studio 11 替换文件夹,则会执行单元测试。

为什么 VS 2012 使用 10 版本的 mstest?使用的所有其他 VS 可执行文件都是 11 版本?'Where mstest.exe' 表示它在同一服务器中的 11 个文件夹下。

为什么有 Visual Studio 10 文件夹 - 我们还没有在这个服务器上安装版本 10?

在单元测试项目中,引用了正确的单元测试框架(在 VS 11 文件夹下)-但根据属性,它们似乎也具有 10.0.0 版本。

构建服务器日志有:


找不到来自源 VSTTExecution 的事件 ID 0 的描述。引发此事件的组件未安装在本地计算机上,或者安装已损坏。您可以在本地计算机上安装或修复组件。

如果事件起源于另一台计算机,则显示信息必须与事件一起保存。

活动中包含以下信息:

(MSTest.exe, PID 3324, Thread 10) DIA initialization threw:
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {B86AE24D-BF2F-4AC9-B5A2-34B14E4CE11D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

在 Microsoft.VisualStudio.TestTools.Common.DiaHelper.GetSymbolsFileName(字符串 imagePath)

消息资源存在,但在字符串/消息表中找不到消息


(

QTAgent32.exe, PID 3780, Thread 12) Received exception calling Adapter.AbortTestRun: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Object must implement IConvertible.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at System.Runtime.Serialization.FormatterConverter.Convert(Object value, Type type)
   at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
   at Microsoft.VisualStudio.TestTools.Common.SerializationHelper.GetField(Type fieldType, Object defaultValue)
   at Microsoft.VisualStudio.TestTools.Common.SerializationHelper.GetField[T]()
   at Microsoft.VisualStudio.TestTools.Common.TestResult..ctor(SerializationInfo info, StreamingContext context)
   at Microsoft.VisualStudio.TestTools.Common.TestResultAggregation..ctor(SerializationInfo info, StreamingContext context)
   at Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestResult..ctor(SerializationInfo info, StreamingContext context)

--- 内部异常堆栈跟踪结束 ---


4

0 回答 0