xamarin 中的 NUnit 错误 [英] NUnit error in xamarin

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

问题描述

我是使用 xamarin 编程和学习 C# 的新手我正在尝试进行单元测试,但收到此错误:

I am new to programming and learning C# using xamarin I am trying to do unit test but getting this error:

'TestFixtureAttribute' 已过时:'NUnit 框架随附Mono 已弃用,并将在未来版本中删除.它是基于已过时的 NUnit 2.4.请移至 NUnitNuGet 包或其他获取 NUnit 的形式.'

'TestFixtureAttribute' is obsolete:'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. it was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'

谢谢

推荐答案

看来您需要更改您引用的 TextFixtureAttribute.Mono 本身包含 NUnit 2.4,因此您仍然可以访问参考,但正如错误所说,它已过时.如果您使用的是 Visual Studio,您可以通过右键单击您的项目并单击管理 NuGet 包来安装新版本的 NUnit.

Seems like you need to change the TextFixtureAttribute you reference. Mono itself has NUnit 2.4 included in it, so you can still access the reference, but as the error says it has become obsolete. If you are using Visual Studio you can install the new version of NUnit by right clicking on your project and clicking Manage NuGet Packages.

在那里搜索 NUnit 并安装该软件包.然后将您现在使用的引用更新为新的 NUnit.(您可能需要更改文件顶部的 Using 语句.)

Search for NUnit there and install the package. Then update the reference you are using now to the new NUnit one. (you will problably have to change your Using statements at the top of your file.)

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

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