NUnit在Mono下的问题 [英] Problems with NUnit under Mono

查看:207
本文介绍了NUnit在Mono下的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是我有一个在visual Studio .NET 4.0开发的项目,它必须与Mono兼容。



MoMa工具说没有问题。当我尝试使用NUnit Mono 2.0配置文件对我进行测试时,下一个例外:

  System.MissingMethodException ... 
在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.RealProxy rp,IMessage msg,System.Exception& exc,System.Object []& out_args)[0x00000] in< ;文件名未知>:0

我安装了Mono 2.10,如果我尝试运行另一个项目测试用MonoDevelop与Nunit Mono 2.0配置文件一起使用,所以我该怎么办?



PS:目的是在Mono下运行单一测试,以确保他们工作

解决方案

确保您正在将测试项目编译为.NET Framework 2.0,如果要在Mono 2.0简介。这听起来像是您引用.NET 4.0代码,并尝试在Mono 2.0配置文件下运行它。


my problem is that I have a project developed in visual Studio .NET 4.0 and it must have compatibility with Mono.

MoMa tool says that there's no problem. When I try to run the tests with NUnit Mono 2.0 Profile says to me the next exception:

System.MissingMethodException...
  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000] in <filename unknown>:0 

I have Mono 2.10 installed, and if I try to run another project test debeloped with MonoDevelop with Nunit Mono 2.0 profile works, so, what can I do?

P.S.: the purpose is to run the unitary tests under Mono, to ensure that they work under it.

解决方案

Make sure you are compiling your test project as .NET Framework 2.0 if you are going to run it under the Mono 2.0 Profile. It sounds like you are references .NET 4.0 code and trying to run it under Mono's 2.0 profile.

这篇关于NUnit在Mono下的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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