调用执行程序'executor:// mstestadapter / v2'时发生异常 [英] An exception occurred while invoking executor 'executor://mstestadapter/v2'

查看:270
本文介绍了调用执行程序'executor:// mstestadapter / v2'时发生异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好, 

Hi All, 

我们正在使用VS 2017 Enterprise。我们正在使用Fakes框架进行模拟。我们项目的某些部分正在使用Entity framework 6.0。我们也在使用Unity Container。

We are using VS 2017 Enterprise. We are using Fakes framework for mocking. Some parts of our projects are using Entity framework 6.0. We are also using Unity Container.

我将DataAccess项目添加到Unit Test并生成了Fakes。我收到错误 

I added the DataAccess project to the Unit Test and generated Fakes . I have been getting an error 

"调用执行程序'executor:// mstestadapter / v2'时发生异常:在程序集'XXX,Version = 8.6.0.0中输入'XYZContainer' ,Culture = neutral,PublicKeyToken = null'未标记为可序列化。"

"An exception occurred while invoking executor 'executor://mstestadapter/v2': Type 'XYZContainer' in assembly 'XXX, Version=8.6.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable."

我尝试将容器装饰为'Serializable'而没有运气。我尝试了mstest.TestFramework版本1.1.17,1.1.13,1.1.14 

I tried decorating the container as 'Serializable' without luck. I tried the mstest.TestFramework version 1.1.17, 1.1.13, 1.1.14 

也尝试了mstest.TestAdapter上的相同版本。 

also tried the same versions on the mstest.TestAdapter. 

非常感谢任何建议。

问候

Yogendra

推荐答案

嗨Yogendra,

Hi Yogendra,

你介意安装最新款吗? EF,mstest.TestFramework和TestAdapter的版本并试一试?

Would you mind installing the latest version of EF, mstest.TestFramework and TestAdapter and have a try?

EntityFramework 6.1.3:
https://www.nuget.org/packages/EntityFramework/

EntityFramework 6.1.3: https://www.nuget.org/packages/EntityFramework/

MSTest.TestAdapter 1.1.17:
https://www.nuget.org/packages/MSTest.TestAdapter/1.1.17

MSTest.TestAdapter 1.1.17: https://www.nuget.org/packages/MSTest.TestAdapter/1.1.17

MSTest.TestFramework 1.1.17:
https: //www.nuget.org/packages/MSTest.TestFramework/1.1.17

MSTest.TestFramework 1.1.17: https://www.nuget.org/packages/MSTest.TestFramework/1.1.17

祝你好运,

Fletch


这篇关于调用执行程序'executor:// mstestadapter / v2'时发生异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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