将NUnit与Vs2008 Pro一起使用时出错 [英] Error when using NUnit with Vs2008 pro

查看:101
本文介绍了将NUnit与Vs2008 Pro一起使用时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我的NUnit有问题:我有一个使用vs2008 pro(C#语言)的测试项目.我的项目在VS2008中使用单元测试工具工作,但是当我尝试在NUnit中运行它时,出现错误:

此程序集未使用任何已知的测试项目构建"

我已经搜索过了,它说很多人都遇到了这个问题,但是没有答案为什么会发生:(

Dear all,

I have a problem with NUnit: I have a testing project in vs2008 pro(C# language). My project work with Unit test tool in VS2008 but when I try to run it in NUnit, there is an error:

"This assembly was not built with any known testing project"

I have searched for this, it said that many people meet this problem but there is no answer why it happen :(

I''m working with
NUnit-2.5.9.10348
VS2008 pro

推荐答案

轻松调试NUnit测试可从Visual Studio 2008专业版 [^ ] CP的文章可能会对您有所帮助.
Easy Debugging of NUnit Tests from Visual Studio 2008 Professional[^]article from CP might help you.


亲爱的所有人,

我发现了问题所在,这可能也会对遇到此问题的人有所帮助.

我已经使用vs2008自动创建了单元测试代码,因此它使用[TestClass()]和[TestMethod()]与vs 2008一起声明,而NUnit使用[TestFixture]和[Test].

这就是NUnit无法识别我的单元测试方法的原因.
Dear all,

I find out the problem, it may helps someone who is getting this trouble too.

I have create unit test code with vs2008 automatically, so it uses [TestClass()] and [TestMethod()] to declare with vs 2008 while NUnit uses [TestFixture] and [Test].

That''s why NUnit did not recognize my unit test method.


这篇关于将NUnit与Vs2008 Pro一起使用时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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