Hi there!
I am new in town! I will start off with this Visual Studio problem and see where things go from there. Hopefully, I will visit these forums many times to come.
I have a Windows 10 Pro PC here, and the latest build of Visual Studio 2017 Community edition. The problem is that I cannot get the unit tests to work.
I have done a complete uninstall of Visual Studio 2017, then installed the latest build again.
I have created a new solution, with only one project - the C# unit test project. I used the template code, without any modification.
It doesn't do anything when I click the Run All link in Test Explorer panel.




This is the code:
The first time I click, it tells me this:
Discover test finished: 0 found
Then I click to run the tests again and it just hangs itself and doesn't say anything. The system is not hanged, nor is Visual Studio. It even says "build succeeded". It's just the output window for the tests that look dead from my view. I even tried to alter the code a bit, to make it pass, like so:
Still nothing!
What could be the problem? What can I do to try to resolve this? Ultimately, I will be reinstalling the entire PC. But before I do, I would like to see if this can be sorted out.
Thank you!
I am new in town! I will start off with this Visual Studio problem and see where things go from there. Hopefully, I will visit these forums many times to come.
I have a Windows 10 Pro PC here, and the latest build of Visual Studio 2017 Community edition. The problem is that I cannot get the unit tests to work.
I have done a complete uninstall of Visual Studio 2017, then installed the latest build again.
I have created a new solution, with only one project - the C# unit test project. I used the template code, without any modification.
It doesn't do anything when I click the Run All link in Test Explorer panel.




This is the code:
C#:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject2
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
}
}
}
The first time I click, it tells me this:
Discover test finished: 0 found
Then I click to run the tests again and it just hangs itself and doesn't say anything. The system is not hanged, nor is Visual Studio. It even says "build succeeded". It's just the output window for the tests that look dead from my view. I even tried to alter the code a bit, to make it pass, like so:
C#:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
int a = 44;
Assert.AreEqual(a, 44);
}
}
}
Still nothing!
What could be the problem? What can I do to try to resolve this? Ultimately, I will be reinstalling the entire PC. But before I do, I would like to see if this can be sorted out.
Thank you!
Last edited: