繁体   English   中英

如何在 Visual Studio 2022 中设置 NUnit?

[英]How do I set up NUnit in Visual Studio 2022?

NUnit 是否在 Visual Studio 2022 下工作? 我能找到的所有设置说明都与以前版本的 Visual Studio 相关,并引用了不存在的内容(例如“工具 -> Visual Studio 中的管理扩展菜单。单击在线并输入搜索词作为 NUnit 测试适配器” -搜索没有结果)。 如果它确实有效,我该如何设置它?

您可以使用 NuGet 包添加 NUnit 框架和 NUnit 测试适配器。

To do that, right click on your project in Solution Explorer, go to Manage NuGet packages... , in the Browse section type nunit , install NUnit package and the corresponding version adapter (NUnitTestAdapter for NUnit 2.x or NUnit3TestAdapter for NUnit 3. X)。

FWIW,我同时安装了 NUnit Framework 和 NUnit Test Adapter 包,但我的测试仍然被忽略。 我还必须安装 Microsoft.NET.Test.Sdk package。 我似乎总是忘记这个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM