NUnit error in xamarin

感情迁移 提交于 2019-12-24 12:00:20

问题


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

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

thanks


回答1:


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.

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.)



来源:https://stackoverflow.com/questions/45738742/nunit-error-in-xamarin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!