Visual Studio 2013 更新 4 后 MS Fakes 单元测试失败 [英] MS Fakes unit tests failing after Visual Studio 2013 Update 4

查看:24
本文介绍了Visual Studio 2013 更新 4 后 MS Fakes 单元测试失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从 Microsoft Visual Studio 2013 Update 3(高级版)升级到 Microsoft Visual Studio 2013 Update 4(高级版),现在我现有的单元测试项目已停止编译.它失败并出现错误:

I have recently upgrade from Microsoft Visual Studio 2013 Update 3 (Premium edition) to Microsoft Visual Studio 2013 Update 4 (Premium edition) and now my existing unit test projects have stopped compiling. It fails with the error:

类型'Microsoft.QualityTools.Testing.Fakes.Stubs.StubBase`1'在未引用的程序集中定义.你必须添加一个对程序集Microsoft.QualityTools.Testing.Fakes"的引用,版本=12.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a'

The type 'Microsoft.QualityTools.Testing.Fakes.Stubs.StubBase`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

我们和其他很多人都遇到了类似的问题,即 VS2013 中引入了一个错误,可以通过手动删除 FakesAssemblies 中的 .messages 文件(通过文件资源管理器或启用查看所有文件的解决方案资源管理器)来解决该问题项目文件夹内的文件夹.然而,这并不能解决问题,即使我删除了整个 FakesAssemblies 文件夹.

We, along with a lot of other people, had a similar issue where a bug was introduced in VS2013 that could be resolved by manually deleting the .messages file (via File Explorer or solution explorer with view all files enabled) inside FakesAssemblies folder inside the project folder. This however doesnt fix the issue, even if I delete the entire FakesAssemblies folder.

对项目的引用(包括他们在项目内的正确版本).我已经删除了引用并重新阅读了它,它没有任何效果,他们仍然无法编译.

The reference to the project (including correct version is their within the project). I have deleted the reference and readded it and it has no effect, they still fail to compile.

单元测试项目仍然可以通过 Visual Studio 2013 Update 3 编译并通过其他同事的机器.

The unit test projects still compile and pass on other colleagues machines with Visual Studio 2013 Update 3.

使用 MS fakes 的新项目单元测试项目也无法构建.

New projects unit test projects using MS fakes also fail to build.

除此之外,卸载更新 4 还有什么我可以尝试的吗?

So short of, uninstalling the Update 4 is there anything else I can try?

如果没有,我将在 Microsoft Connect 上记录错误.

If not I'll log a bug on Microsoft Connect.

推荐答案

  1. 修复方法是删除所有以 .FAKES 结尾的引用(包括 Microsoft.QualityTools.Testing.Fakes.dll 引用).
  2. 我还删除了 FAKES 文件夹
  3. 清洁的解决方案
  4. 然后重新读回所有参考文献.

我们还有一些与 Shims 相关的错误,但我们只是将它们转换为 Stub.

We had some further errors to do with Shims but we just converted these to Stubs.

我们必须以这种方式手动升级所有项目,包括构建服务器在内的所有 VS 实例.

We had to upgrade all our projects this way manually, all VS instances including the build server.

这篇关于Visual Studio 2013 更新 4 后 MS Fakes 单元测试失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆