Reputation: 1453
I can't run Unit Tests in my project, for about 4 days ago, I've already tried a lot of solutions that's existing in SO, but nothing helped me.
No test is available in Path\To\My\TestProject.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Test Explorer shows my tests, but can't run them.
Btw. These are WPF C# projects.
I have test classes with test methods like this:
[TestFixture]
[Category("Something")]
public class SomeTestClass
{
[Test]
public void SomeMethodThatDoesntWork()
{
using (var ms = new MemoryStream())
{
System.Diagnostics.Debugger.Launch();
Option savedOptions = new ....
...
I have 3 projects in my solution, every project's Target framework is .NET 4.5.2 and every project's Platform Target is x64.
NuGet packages: NUnit 2.6.4 and NUnit3TestAdapter 3.12.0.
NUnit 2.6.4 because of I have some Attributes like ExpectedExceptionAttribute that is already removed in newer NUnit versions.
I've already set Test\Test Settings\Default Processor Achitecture to x64 and also tried x86.
Test Console Output:
Test Exlorer:
Upvotes: 0
Views: 4317
Reputation: 925
What solved it for me was:
Run tests.
Upvotes: 1
Reputation: 1453
Finally solved my problem in about 2 days.
There was DLL dependencies which those Visual Studio couldn't notice and didn't show me any warning or errors. Dependency Walker helped me to find those dependencies of my DLLs.
So what I've learnt again? Visual Studio can be buggy and sometimes isn't really smart.
Upvotes: 1