Hello,
I'm trying to configure my test project in Visual Studio 2017. It used to run in Visual Studio 2015. Visual Studio 2015 was able to discover all 824 unit tests. Then when I migrated my projects over to VS2017, it could not discover the tests.
Then I came across this article which explains that VS2017 deals with unit tests differently:
https://stackoverflow.com/questions/42861930/unit-tests-not-discovered-in-visual-studio-2017
It explains that the test project must target either .NET Core or .NET Framework. My test project targets .NET Framework 4.6. Then It explains that I need to include the following itemgroup in my project file (which wasn't included and I'm not sure how to included it through the interface, so I open the file in Notepad++ and copied and pasted):
<itemgroup>
<packagereference Include="Microsoft.NET.Test.Sdk" Version="15.0.0"></packagereference>
<packagereference Include="NUnit" Version="3.6.1"></packagereference>
<packagereference Include="NUnit3TestAdapter" Version="3.8.0-alpha1"></packagereference>
</itemgroup>
Then I compiled my project. It said that the reference to nunit.framework 3.6.1 conflicts with the reference to nunit.framework 2.6.3. So I removed the reference to 2.6.3, recompiled, and it worked. However, only 77 of my unit tests were discovered.
Why will visual studio 2017 not discover my other unit tests?
I am including a screen shot of my reference list:
https://ibb.co/kFuEYF