Can Tests be written in 3.5 MsTest Unit Test assemblies?

老子叫甜甜 提交于 2019-12-07 10:54:46

问题


Hi: I've enjoyed playing around with Pex and Moles...now it's time to use it in earnest to cover an legacy app as much as possible.

We've started by converted to .NET 3.5 (the client can't yet host in .NET 4.0)

We noticed that we are having trouble with getting Moles to work.

Seems to work if the Test Project assembly is a .NET 4.0 -- but when converted the Unit Tests assembly framework back to .NET 3.5 (after installing Visual Studio 2010 SP1 to give that ability) it stops working.

Keeps complaining with "you can only run tests using the default host adapter from a test assembly that targets .NET framework 3.5"

If the client wants everything to be in .NET 3.5 -- including the unit tests...any ideas?


回答1:


At the end of this post from the MS Visual Studio Test Team blog, in the 'Known limitations' section, it states that:

Execution of .NET Framework 3.5 tests is supported only in the default host adapter.

Moles uses a MolesAgentAdapter instead of the default and so the unit test library must be .NET 4.0 compatible.



来源:https://stackoverflow.com/questions/5492052/can-tests-be-written-in-3-5-mstest-unit-test-assemblies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!