Repository navigation
Closed
Labels
Description
Hi,
In VS 2015 Pro, I'm trying to execute tests and have the following error in the Test output:
------ Discover test started ------
NUnit Adapter 3.0.10.0: Test discovery starting
NUnit Adapter 3.0.10.0: Test discovery starting
Error: Unable to get runner for this assembly. Check installation, including any extensions.
AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Error: Unable to get runner for this assembly. Check installation, including any extensions.
AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
========== Discover test finished: 0 found (0:00:00,229737) ==========
And no tests are discovered in the test explorer pane.
In VS 2013 Pro, I have a similar issue. Tests are discovered, I see them in the Test Explorer pane, but I have this message in test output:
------ Discover test started ------
NUnit Adapter 3.0.10.0: Test discovery starting
Assembly contains no NUnit 3.0 tests: C:\dev\HtmlAgilityPack\HtmlAgilityPack\bin\fx.4.0\Debug\HtmlAgilityPack.dll
NUnit Adapter 3.0.10.0: Test discovery complete
========== Discover test finished: 13 found (0:00:00,4854059) ==========
But when I try to execute them ("Run All"), I get the following logs:
------ Run test started ------
NUnit Adapter 3.0.10.0: Test execution started
Running all tests in C:\dev\HtmlAgilityPack\HtmlAgilityPack.Tests\bin\Debug\HtmlAgilityPack.Tests.dll
Error: Unable to get runner for this assembly. Check installation, including any extensions.
AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Exception Mono.Cecil.AssemblyResolutionException, Exception thrown executing tests
Failed to resolve assembly: 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
NUnit Adapter 3.0.10.0: Test execution complete
No test is available in C:\dev\HtmlAgilityPack\HtmlAgilityPack.Tests\bin\Debug\HtmlAgilityPack.Tests.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
========== Run test finished: 0 run (0:00:02,2307088) ==========
I saw what was written in this issue #85 which has similar issue but could not understand what I am supposed to do to fix this
I tried adding the .addins file in packages\NUnit3TestAdapter.3.0.10\lib.addins with no success.
The source code is here:
https://github.com/tomap/HtmlAgilityPack
Launch Solutions/HtmlAgilityPack.4.5.sln
Help would be appreciated.
Thomas
Activity
OsirisTerje commentedon May 24, 2016
This code seems to trigger a bug in Visual Studio test system, I don't get the same results as you, but the test named StackOverflow (interesting name btw) seems to cause the test system to crash. I have forwarded the issue to Microsoft first for investigation, and if it turns out there are different issues, I will come back to this one, but I suspect it is the same.
OsirisTerje commentedon May 24, 2016
And what I see is that it does find some tests, but crashes mid way.

And, just for info, I have the vsix adapter installed too.
tomap commentedon May 25, 2016
Hi,
Thank you for looking into it.
Do you need me to +1 on a MS ticket ?
Note that I have the same issue with the following projects:
Thomas
OsirisTerje commentedon May 25, 2016
Thanks for the links, Thomas, I'll forward them too.
There is no public ticket, just an internal one at MS, they will respond here or just inform us when they have looked at it.
OsirisTerje commentedon May 25, 2016
@tomap: The StackOverflow test above goes into an infinite loop, which is what crashes the text explorer. If you replace the url with something else, like http://google.com it works. What are you really testing here?

And, have you tested using the vsix adapter to see if it works otherwise (given you replace that strange url). You find the vsix here: https://visualstudiogallery.msdn.microsoft.com/0da0f6bd-9bb6-4ae3-87a8-537788622f2d
CharliePoole commentedon May 25, 2016
Given that the test is named "StackOverflow" I'm guessing that's what @tomap is trying to test. :-)
But it has not been possible for many years (since .NET 1.1, I believe) for the test system to recover after a stack overflow. My inclination is to close this and remove the vs-followup. @OsirisTerje ?
OsirisTerje commentedon May 25, 2016
I just checked your second link, the GraphWIz project, and it works all fine. IT also works without the vsix, using just the nuget adapter.
OsirisTerje commentedon May 25, 2016
@CharliePoole : Agreed, done.