问题
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