Create Unit Tests context menu option missing in 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 中缺少创建单元测试上下文菜单选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Visual Studio 2017 中缺少创建单元测试上下文菜单选项?
基础教程推荐
- 如何激活MC67中的红灯 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01