Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no source available to run tests in Visual Studio 2017

I'm having trouble debugging a project. When I double click on the tests to open them, it says "no source available" and I can not also debug or run a specific one. I can only run them all by the tool or by git bash using dotnet test.

Any idea what that might be? These problems started when we migrated to ASP.NET Core.

Project is with net461.

Thanks,

like image 264
Camilla Martins Avatar asked Mar 05 '18 17:03

Camilla Martins


People also ask

How do I enable test in Visual Studio?

Visual Studio 2019 version 16.3 and earlier To specify a run settings file in the IDE, select Test > Select Settings File. Browse to and select the . runsettings file. The file appears on the Test menu, and you can select or deselect it.

How do I enable live unit testing?

Start, pause, and stop To enable Live Unit Testing, select Test > Live Unit Testing > Start from the top-level Visual Studio menu. When Live Unit Testing is enabled, the options available on the Live Unit Testing menu change from a single item, Start, to Pause and Stop: Pause temporarily suspends Live Unit Testing.

How do I run a test in Visual Studio 2017?

Run tests in Test Explorer If Test Explorer is not visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer (or press Ctrl + E, T). As you run, write, and rerun your tests, the Test Explorer displays the results in a default grouping of Project, Namespace, and Class.


1 Answers

Restarting visual studio and building test assembly did it for me.

like image 94
Imad Avatar answered Nov 14 '22 23:11

Imad