.NET Visual Studio 2010中的测试驱动开发(TDD)

时间:2012-03-28 09:58:39

标签: visual-studio-2010 nunit

我是.NET的初学者,如何在Visual Studio 2010中安装NUnit测试?

我试过这个:

PM> install-package Nunit

但我收到此错误消息:

Install-Packag : The schema version of 'NUnit' is incompatible with version 1.2.20325.9034 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
Au niveau de ligne : 1 Caractère : 16
+ Install-Package <<<<  NUnit
+ CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

2 个答案:

答案 0 :(得分:1)

根据错误消息....单击链接以将NuGet升级到最新版本。然后再试一次。

或者,转到nunit.org,下载NUnit DLL文件,然后在项目中引用它们。

答案 1 :(得分:0)

您可以转到Visual Studio IDE中的菜单工具 Extension Manager 并卸载扩展程序。然后重新启动Visual Studio并重新安装扩展。