Visual Studio 2017中缺少创建单元测试上下文菜单选项吗? [英] Create Unit Tests context menu option missing in Visual Studio 2017?

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

问题描述

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

我知道有一些历史记录已被删除,并且

我可以确认这已在最新版本的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项目仍然无法使用此方法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中缺少创建单元测试上下文菜单选项吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆