After creating a brand new .NET Core class library and unit test project, the IDE discovers my test, but not the console.
A project created using the steps below is available from this link.
Class1 that can be called from an external module.vstest.console.exe "C:\...\bin\Debug\netcoreapp1.1\UnitTestProject1.dll" /UseVsixExtensions:true /logger:trx/Framework:FrameworkCore10 per #579; the result is the sameThe single test in the project, TestMethod, should execute and pass.
Starting test execution, please wait...
Warning: No test is available in C:\...\bin\Debug\netcoreapp1.1\UnitTestProject1.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
vstest.console.exe 15.0.26228.0@ekumlin from https://github.com/Microsoft/vstest/issues/443#issuecomment-277467717, to run .Net Core tests project, please use vstest.console.exe from folder C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\.
Edit: From VS 2017 update 5, All the requests to TPv1 forwards to TPv2.
TP v1:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindowvstest.console.exe
TP v2: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatformvstest.console.exe
Thank you for the reply. Unfortunately, this does not work either.
>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" "C:\...\bin\Debug\netcoreapp1.1\UnitTestProject1.dll" /logger:trx
Microsoft (R) Test Execution Command Line Tool Version 15.0.0.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
No test is available in C:\...\bin\Debug\netcoreapp1.1\UnitTestProject1.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
I also tried with /UseVsixExtensions:true, but that provided an error:
The test source file "/UseVsixExtensions:true" provided was not found.
@ekumlin For .Net Core project, /Frameowrk:FrameworkCore10 should be provided when running with vstest.console.exe
Edit: From vstest 15.5 onwards, /Framework argument is not required for .NET Core targeted tests.
@smadala Great, those two fixes together work.
What is the difference between the vstest.console.exe on the Developer Console and the C:\...\vstest.console.exe path you provided? Why do we have to specify?
@smadala Hi I just want to ask something this is a bit irrelevant to the current topic but I hope you can help me.
Why is it that I can't add a new capability on a certain build agent (this is a private pipeline). I tried adding a new one but it doesn't displays on the list of capabilities.
Is there any work around on this?
Here's a screenshot of what I mean.

As you can see the Save Changes and Undo Changes buttons are disabled. That's when I added the new capability.
Also the "here" link isn't available.
Edited the link
The link is still not available.
Thanks works now! :)
I found that the my older mstest csproj files didn't include various targets needed for VSTO to find unit tests. I created a new MSTest project and compare that with the existing csproj files and found a stack of references that needed to be copied to my older projects.
E.g.
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
I am trying to run vstest.console.exe for a Xamarin UI test project and I am getting message
Starting test execution, please wait...
No test is available in E:\UnitTests\XFUITest\bin\Debug\Xamarin.UITest.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
I am using Enterprise version of VS2017 15.4.4.
command I am using is
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform>vstest.console.exe E:\UnitTests\XFUITest\bin\Debug\Xamarin.UITest.dll /logger:trx
Can you please help @smadala
@pMaske What is target framework of Xamarin.UITest.dll? Can you please create separate issue with all details in Issue template?
Most helpful comment
@smadala Great, those two fixes together work.
What is the difference between the
vstest.console.exeon the Developer Console and theC:\...\vstest.console.exepath you provided? Why do we have to specify?