gpt4 book ai didi

c# - xamarin 中的 NUnit 错误

转载 作者:太空宇宙 更新时间:2023-11-03 22:55:12 24 4
gpt4 key购买 nike

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

'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。

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

关于c# - xamarin 中的 NUnit 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45738742/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com