Visual Studio 2017 中缺少创建单元测试上下文菜单选项?

Create Unit Tests context menu option missing in Visual Studio 2017?(Visual Studio 2017 中缺少创建单元测试上下文菜单选项?)
本文介绍了Visual Studio 2017 中缺少创建单元测试上下文菜单选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 VS2017 副本中似乎缺少创建单元测试"上下文菜单选项.

我知道它被删除的历史有一段历史,并且

编辑 2:我可以确认这已在最新版本的 VS 中得到修复.

解决方案

这似乎是一个已知问题,如下所述:

<块引用>

Visual Studio 团队 ♦♦· 6 天前 0(2017 年 3 月 17 日)

感谢您的反馈!我们已经修复了问题和错误修复将包含在下一个更新版本中.谢谢你帮助我们构建更好的 Visual Studio!

https://developercommunity.visualstudio.com/content/problem/24835/create-unit-tests-missing-when-right-click-in-meth.html

我可以确认这在最新版本的 VS 中现已修复(针对针对完整 .NET 框架的项目).

注意:这仍然不适用于 .NET Core 项目 根据这个问题.

The 'Create Unit Test' context menu option seems to be missing from my copy of VS2017.

I know there was a bit of history where it was removed and then re-added in VS2015 after much outcry, but as far as I can tell from the Microsoft documentation for VS2017 it should be there now?

The solution I'm working on contains an ASP.NET Web API 2 app, a C# Class Library and a couple of test projects, all targeting .NET Framework 4.5.1. (I'm aware that this option shouldn't be there for .Net Core or .Net Standard projects (as discussed at length in this question).

I've tried right clicking the class name and method name in the code window, the class name tab and the class file in solution explorer all to no avail.

Edit: The "Testing tools core features" is already installed in my copy of VS:

Edit 2: I can confirm this is now fixed in the latest versions of VS.

解决方案

This appears to be a known issue as stated here:

Visual Studio Team ♦♦ · 6 days ago 0 (March 17, 2017)

Thank you for your feedback! We have fixed the problem and the bug fix will be included in an next update release. Thank you for helping us build a better Visual Studio!

https://developercommunity.visualstudio.com/content/problem/24835/create-unit-tests-missing-when-right-click-in-meth.html

Edit: I can confirm this is now fixed (for projects targeting the full .NET framework) in the latest versions of VS.

NB: This is still not expected to be working for .NET Core projects as per this question.

这篇关于Visual Studio 2017 中缺少创建单元测试上下文菜单选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)