单元测试失败:显示“创建单元测试"向导时出现意外错误

编程入门 行业动态 更新时间:2024-10-10 19:18:59
本文介绍了单元测试失败:显示“创建单元测试"向导时出现意外错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个网站,该网站已从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

更多推荐

单元测试失败:显示“创建单元测试"向导时出现意外错误

本文发布于:2023-10-10 21:57:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1479871.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单元测试   向导   意外   错误   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!