MSTest.exe 抛出 "Exception has been thrown by the target of an invocation."

MSTest.exe throws "Exception has been thrown by the target of an invocation."

在构建服务器 (Windows Server 2018 R2) 上,我使用以下命令执行测试: MSTest.exe /testcontainer:artifacts\MyAssembly.Tests.dll /resultsfile:testresults-01.trx

这适用于 .NET 4.7。然后我升级到.NET 4.7.2,将Visual Studio2017升级到15.8.3版本。升级后,上述命令失败。

来自 MSTest.exe 日志的错误:

W, 2476, 1, 2018/09/07, 09:23:42.270, VWBUILD02\MSTest.exe, 测试类型: #313, {ec4800e8-40e5-4ab3-8510-b8bf29b1904d}:无法从 'Microsoft.VisualStudio.QualityTools.Tips.OrderedTest.Tip, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a:#313'

中找到名称的字符串资源

W, 2476, 1, 2018/09/07, 09:23:42.375, VWBUILD02\MSTest.exe, EqtException: 调用目标抛出异常。

我不再在构建服务器上使用 MSTest.exe。我开始改用 VSTest.Console.exe。