单元测试失败:显示“创建单元测试"向导时出现意外错误 [英] Unit testing fails : Unexpected error while displaying Create Unit Test wizard

查看:136
本文介绍了单元测试失败:显示“创建单元测试"向导时出现意外错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,该网站已从VS 2005迁移到VS2008.我添加了有关UnitTestFramework的适当参考.

I have a website which is migrated from VS 2005 to VS 2008. I have added appropriate reference of UnitTestFramework.

当我尝试添加单元测试时,网站一段时间没有响应,然后引发错误,显示创建单元测试向导时出现意外错误".重建解决方案,然后重试."但是重建无济于事.

When i try to add a unit test, the website goes unresponsive for a while and then throws an error saying ' Unexpected error while displaying Create Unit Test wizard. Rebuild the solution and try again' But rebuild does not help.

我手动添加了一个测试项目.但是,当我尝试添加单元测试时,每次创建一个不同的目录(在我的Temp文件夹中的某个位置试图查找目录)时,创建向导都会出现找不到目录"错误.

I manually added one test project. But when i try to add unit test, the Creation wizard comes up with 'Directory not found' error each time it comes up with a different directory (somewhere in my Temp folder its trying to find a directory).

有人可以帮我解决这个问题吗!

Can someone please help me with this solution !

预先感谢

Avani

推荐答案

嗨阿凡妮,

您的项目文件中可能还有一些剩余物.关闭解决方案,然后在创建测试项目的解决方案文件夹中删除虚构目录.然后打开tje .sln文件并检查不属于的项目引用 在那里,删除那些.

You have probably some leftovers in your project file. Close the solution, then remove the psysical direcotories in your solution folder in which the test project(s) were created. Then open tje .sln file and check for project references that do not belong there, remove those.

然后将一个新的测试项目添加到您的解决方案中.在添加新测试之前进行构建.

Then add a new test project to your solution. Do a build before adding a new test.

亲切的问候,
汤姆·德·科宁(Tom de Koning)

Kind regards,
Tom de Koning


这篇关于单元测试失败:显示“创建单元测试"向导时出现意外错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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