TestHost.dll discovery does not work on the Mac
See original GitHub issueDescription
Steps to reproduce
Visual Studio for Mac uses the test discovery protocol to discover tests. It currently uses an old 15.5 version but we were looking to update. Using vstest 16.4.0 in VS Mac and test discovery no longer works. It seems that the testhost.dll path is not determined when not on Windows and dotnet fails since no testhost.dll path is being used.
Expected behavior
.NET Core xUnit tests can be discovered and run in VS Mac.
Actual behavior
Test discovery fails.
Test Discovery Console output in VS Mac has:
Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with error: The application to execute does not exist: ''
. Please check the diagnostic logs for more information.
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure (System.Int32 connTimeout) [0x00074] in <6ce2e22cf5c344a4a7f798b25098ce9c>:0
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel (System.Collections.Generic.IEnumerable`1[T] sources, System.String runSettings) [0x0028d] in <6ce2e22cf5c344a4a7f798b25098ce9c>:0
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests (Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.DiscoveryCriteria discoveryCriteria, Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestDiscoveryEventsHandler2 eventHandler) [0x00015] in <6ce2e22cf5c344a4a7f798b25098ce9c>:0
The code in 16.4 compared with 16.2 has been changed so the test host path is no longer resolved.
Diagnostic logs
failed: https://gist.github.com/mrward/caed5cbbd4633be5c1c2674549cb5162
Environment
macOS 10.15.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
vstest 16.4.0 vstest.console process failed to connect ...
vstest.console and testhost are extracted from Microsoft.TestPlatform. ... TestHost.dll discovery does not work on the Mac #2260.
Read more >Visual Studio Mac does not close dotnet process ...
A fix for this issue has been released! Install the most recent release from https://visualstudio.microsoft.com/downloads/. Thank you for ...
Read more >Unable to find testhost.dll. Please publish your test project ...
I've fixed it in the same way. Downgrade of xUnit.runner.visualstudio package to 2.4.1 was solve problem. – Jacek Labuda. Jun 8, 2020 at...
Read more >Problems with .NET unit testing
OS version, for example, Windows 10 or Mac OS X 10.8 · JetBrains Rider version: Help -> About · Unit testing framework version,...
Read more >Failed Tests in DevOps Pipeline due to "could not find ...
Reinstall .NET Core runtime: If the problem persists, you can try reinstalling the .NET Core runtime on your build machine. You can download...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am not, this was fixed by the mentioned release.
@mrward @rouke-broersma Are you still impacted by this issue?