tomRedox tomRedox -4 years ago 412
C# Question

Create Unit Tests context menu option missing in Visual Studio 2017?

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 targetting .NET Framework 4.5.1. (I'm aware that this option shouldn't be there for .Net Core or .Net Standard projects as discussed on the Microsoft Developer Community forum).

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:

enter image description here

Answer Source

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

One other item of note is that not all of the frameworks support this yet, specifically .NET Core.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download