My build fails with this log:
[12:13:40]: Checking for changes
[12:13:41]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[12:13:41]: Checkout directory: C:\TeamCity\buildAgent\work\9fecf8ffe0e03cce
[12:13:41]: Updating sources: server side checkout...
[12:13:41]: Publishing internal artifacts (4s)
[12:13:41]: Step 1/3: Visual Studio (sln) (17s)
[12:13:58]: Step 2/3: NUnit (19s)
[12:13:58]: Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[12:13:58]: in directory: C:\TeamCity\buildAgent\work\9fecf8ffe0e03cce
[12:14:02]: JetBrains dotCover Console Runner v1.1.252.2. Copyright (c) 2009-2011 JetBrains s.r.o. All rights reserved.
[12:14:05]: Coverage session started [18.8.2011 12:14:05]
[12:14:09]: Start TeamCity NUnit Test Runner
[12:14:09]: Running NUnit-2.5.10 tests under .NET Framework v2.0 x86
[12:14:10]: MySolution.Communication.Tests.dll
[12:14:10]: MySolution.Communication.Tests.TestClass.CanUseGetRequestPacket
[12:14:18]: Coverage session finished [18.8.2011 12:14:18]
[12:14:18]: Analysed application exited with code '255'
[12:14:18]: Coverage session finished but no snapshots were created.
[12:14:18]: Process exited with code -2
[12:14:18]: Step NUnit failed
[12:14:18]: Build step Duplicates finder (.NET) skipped because of previous step failure
[12:14:18]: Publishing internal artifacts
[12:14:18]: Build finished
I am using Teamcity Professional 6.5.2, NUnit-2.5.10 v2.0 MSIL and build-in JetBrains dotCover. Without JetBrains dotCover all is ok. At another project I am using same configuration and all is ok as well. Could be here some problem with my tests assembly?
dotCover fails with obfuscated assemblies.
Related
I am trying to run my automation pipeline on Private hosted agent and getting error as Test Run Failed.
Error: The process 'C:\agent_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.170.1\Modules\DTAExecutionHost.exe' failed with exit code 1
Vstest failed with error. Check logs for failures. There might be failed tests.
Error: The process 'C:\agent_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.170.1\Modules\DTAExecutionHost.exe' failed with exit code 1 Vstest failed with error. Check logs for failures. There might be failed tests.
Based on the error message, the reason for this issue should be that the VSTest task supported .Net Framework 4.6.2 from version 2.170.1.
You need to check the .NET framework version installed on the build agent machine. If the .NET framework version installed on the machine is 4.6.1 or less than that then can you please try upgrading the .Net framework version to 4.6.2.
Here is a doc about the requirement about the Visual Studio test task:
If you're using a Windows self-hosted agent, be sure that your machine
has this prerequisite installed:
.NET Framework 4.6.2 or a later version
In addition, you can try to use the Visual Studio test task version 1.
I have recently upgraded some of our windows application to VS2019 and created the setup project using VSInstallerProject extension in VS2019 . What I noticed is setup is not getting created when the Release pipeline is run , but I need the msi (or exe) files here so I can use the same to install on app server .
I have made changes in my pipeline and added a task : 'DutchWorkz - Build VS Installer(s)' in the release pipeline .
I have attached the logs of the error I am getting at this task in Azure Devops below .
Build is getting failed at this task .
Can anyone guide me on what the issue here is and how can I resolve it ?
Also , I want to create the setup projects/msi in VS2019 , but I don't see Vs2019 option in this task,
how can I use this task in VS2019 version .I have Vs2019 installed on agent server .
2020-09-21T20:04:43.3394997Z ##[section]Starting: Create .msi file(s) from VS Installer project(s).
2020-09-21T20:04:43.3539534Z ==============================================================================
2020-09-21T20:04:43.3539958Z Task : DutchWorkz - Build VS Installer(s)
2020-09-21T20:04:43.3540023Z Description : Build .msi file(s) from VS Installer project(s).
2020-09-21T20:04:43.3540076Z Version : 1.2.4
2020-09-21T20:04:43.3540129Z Author : DutchWorkz B.V.
2020-09-21T20:04:43.3540201Z Help : <b>BuildVsInstaller v1.2.4</b>, DutchWorkz B.V. (Robin Paardekam)<br/><br/>Visual Studio Installer projects are not supported by MSBUILD, so a regular build will not generate your installer files (.msi). Use this build-task to build the .msi file(s) for your project by running devenv on the buildagent directly. <br/><br/><b>Dependencies:</b><br/>Dep1: when using VisualStudio 2017, this task will only function properly if you installed it in the default C:\Program Files (x86)\ location.
2020-09-21T20:04:43.3540311Z ==============================================================================
2020-09-21T20:05:07.5667900Z DEBUG: Aggregated: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com
2020-09-21T20:05:07.5714835Z Now running (C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com) with Arguments ("D:\VSTS Agent Folder\SO\6\s\SOApplications.sln" /Build "release|any cpu" /Project "D:\VSTS Agent Folder\SO\6\s\App_Tool_Installer\App_Tool_Installer.vdproj" /Out "D:\VSTS Agent Folder\SO\6\b\BuildInstaller_Log_20200921200507.txt")
2020-09-21T20:05:15.0213322Z Done running DevEnv process. Success = False.
2020-09-21T20:05:15.0238151Z ##[error]Unable to process command '##vso[task.addattachment type=Distributedtask.Core.Summary;name=Installer project errors;]D:\VSTS Agent Folder\SO\6\b\BuildInstaller_Log_20200921200507.txt' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
2020-09-21T20:05:15.0239574Z ##[error]Cannot upload task attachment file, attachment file location is not specified or attachment file not exist on disk
2020-09-21T20:05:15.1116369Z Attachment added: Log file for Installer generation.
2020-09-21T20:05:15.1928578Z ##[error]An error occurred while running DevEnv! Please review logfile BuildInstaller_Log_20200921200507.txt
2020-09-21T20:05:15.2720322Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).
I have tried using devenv command line too , inorder to build the setup project .I have tried it with both the vs2017 (professional) and vs 2019(enterprise) and I am getting issue in both .While issue with 2017 is about license , I am not able to figure out what's causing the issue for 2019 . Please let me know if you have any thoughts on what could possibly be causing this issue and how can this be resolved . The goal is offcourse to build the setup project with azure devops pipeline and use the generated msi file for installation on app server .
Thanks in advance .
Here's the screenshot for new build and issue :
Build agent server has Vs installer already installed , pls see if this is okay :
Please check the new logs from 'command line task' below :
2020-09-26T16:04:39.7854210Z ##[debug]Evaluating condition for step: 'Command Line Script'
2020-09-26T16:04:39.7856182Z ##[debug]Evaluating: succeeded()
2020-09-26T16:04:39.7856654Z ##[debug]Evaluating succeeded:
2020-09-26T16:04:39.7857594Z ##[debug]=> True
2020-09-26T16:04:39.7858101Z ##[debug]Result: True
2020-09-26T16:04:39.7858600Z ##[section]Starting: Command Line Script
2020-09-26T16:04:39.8082090Z ==============================================================================
2020-09-26T16:04:39.8082357Z Task : Command line
2020-09-26T16:04:39.8082602Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2020-09-26T16:04:39.8082847Z Version : 2.164.2
2020-09-26T16:04:39.8083025Z Author : Microsoft Corporation
2020-09-26T16:04:39.8083274Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2020-09-26T16:04:39.8084133Z ==============================================================================
2020-09-26T16:04:39.8097829Z ##[debug]tf vc resolvePath $\CDM\Dev /loginType:OAuth /login:.,*** /noprompt
2020-09-26T16:04:40.1991127Z ##[debug]D:\VSTSAgent\sn\30\s
2020-09-26T16:04:41.0198149Z ##[debug]VstsTaskSdk 0.9.0 commit 6c48b16164b9a1c9548776ad2062dad5cd543352
2020-09-26T16:04:41.1044331Z ##[debug]Entering D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\cmdline.ps1.
2020-09-26T16:04:41.1126277Z ##[debug]Loading resource strings from: D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\task.json
2020-09-26T16:04:41.1272687Z ##[debug]Loaded 6 strings.
2020-09-26T16:04:41.1306950Z ##[debug]SYSTEM_CULTURE: 'en-US'
2020-09-26T16:04:41.1325343Z ##[debug]Loading resource strings from: D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\Strings\resources.resjson\en-US\resources.resjson
2020-09-26T16:04:41.1467074Z ##[debug]Loaded 6 strings.
2020-09-26T16:04:41.1670941Z ##[debug]INPUT_FAILONSTDERR: 'false'
2020-09-26T16:04:41.1696717Z ##[debug] Converted to bool: False
2020-09-26T16:04:41.1718695Z ##[debug]INPUT_SCRIPT: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv" "D:\VSTSAgent\sn\30\s\st.sn.ComponentManagement.sln" /build release'
2020-09-26T16:04:41.1739155Z ##[debug]INPUT_WORKINGDIRECTORY: 'D:\VSTSAgent\sn\30\s'
2020-09-26T16:04:41.1861366Z ##[debug]Asserting container path exists: 'D:\VSTSAgent\sn\30\s'
2020-09-26T16:04:41.1900763Z Generating script.
2020-09-26T16:04:41.1963727Z Script contents:
2020-09-26T16:04:41.1969048Z "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv" "D:\VSTSAgent\sn\30\s\st.sn.ComponentManagement.sln" /build release
2020-09-26T16:04:41.2078510Z ##[debug]AGENT_VERSION: '2.173.0'
2020-09-26T16:04:41.2148233Z ##[debug]AGENT_TEMPDIRECTORY: 'D:\VSTSAgent\sn\_temp'
2020-09-26T16:04:41.2166134Z ##[debug]Asserting container path exists: 'D:\VSTSAgent\sn\_temp'
2020-09-26T16:04:41.2329780Z ##[debug]Asserting leaf path exists: 'C:\Windows\system32\cmd.exe'
2020-09-26T16:04:41.2337995Z ========================== Starting Command Output ===========================
2020-09-26T16:04:41.2446509Z ##[debug]Entering Invoke-VstsTool.
2020-09-26T16:04:41.2539207Z ##[debug] Arguments: '/D /E:ON /V:OFF /S /C "CALL "D:\VSTSAgent\sn\_temp\442cb1cb-a43b-4d2a-b036-4f16ab588410.cmd""'
2020-09-26T16:04:41.2553937Z ##[debug] FileName: 'C:\Windows\system32\cmd.exe'
2020-09-26T16:04:41.2568488Z ##[debug] WorkingDirectory: 'D:\VSTSAgent\sn\30\s'
2020-09-26T16:04:41.2608339Z ##[command]"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\VSTSAgent\sn\_temp\442cb1cb-a43b-4d2a-b036-4f16ab588410.cmd""
2020-09-26T16:04:47.9474432Z
2020-09-26T16:04:47.9514773Z Microsoft Visual Studio 2019 Version 16.7.3.
2020-09-26T16:04:47.9656002Z Copyright (C) Microsoft Corp. All rights reserved.
2020-09-26T16:04:47.9656269Z
2020-09-26T16:04:47.9656416Z The license for Visual Studio expires in 19 days.
2020-09-26T16:04:47.9656554Z
2020-09-26T16:04:47.9657872Z Some errors occurred during migration. For more information, see the migration report:
2020-09-26T16:04:47.9658144Z D:\VSTSAgent\sn\30\s\UpgradeLog2.htm
2020-09-26T16:04:50.0902169Z 1>------ Build started: Project: st.sn.ComponentManagement, Configuration: Release x86 ------
2020-09-26T16:04:52.8763939Z ========== Build: 1 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========
2020-09-26T16:04:53.4375608Z ##[debug]Exit code: 0
2020-09-26T16:04:53.4417000Z ##[debug]Leaving Invoke-VstsTool.
2020-09-26T16:04:53.4426510Z ##[debug]Leaving D:\VSTSAgent\sn\_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.164.2\cmdline.ps1.
2020-09-26T16:04:53.5245394Z ##[section]Finishing: Command Line Script
Here's the additional error log :
EVEN though the command line task passed , the .vdproj setup project didn't get updated or build . I can see that from timestamp , all other projects getting updated as usual .
I found a similar ticket you can refer to it.
Configure self-hosted agent and make sure the VS Installer Projects extension is installed on your own build agent and then you can build the setup project either use command line task with "devenv" or use the "Build VS Installer" task.
If you get the error like 8000000A, you can follow the instruction here to configure your self-hosted agent: Solution: An error occurred while validating. HRESULT = '8000000A'.
By the way, since this extension is developed by a third party. You can connect the extension owner to get the detail info
Update1
We can install the extension Build VS Installer and use the task DutchWorkz - Build VS Installer(s) to build Visual Studio Installer Project in Azure Pipelines.
I looked at the package you mentioned, at this location - https://marketplace.visualstudio.com/items?itemName=dutchworkz.BuildInstaller&ssr=false#review-details
If you go there and look at the comments other users have left behind, the error is something that is present as part of the build process. The original developer has not fixed it.
At the same, just like the users have mentioned, you are able to see the msi installer and use it. So, you are (I am assuming) getting what you need, the installer.
My best suggestion is, since you are getting what you need, ignore the error and wait till the developer fixes this issue. Until then, there is nothing you or anybody else can do about it.
Note : I also noticed that if you are using the default configuration during the build process for simple projects, it works fine. Your project and build may have some customization which is where other users have reported errors.
In test run log I have Run UnitTests step, which uses Visual Studio Test. However I see log message:
No test is available in C:\stuff\Debug\x64\bin\x86\ilc\MyApp.Test.dll some_other_dlls Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Test are visible in visual studio, and I can run all of them (I have over 50 tests).
I have xunit.runner.visualstudio package installed. What I am missing, why Azure ignores my tests?
**************** Starting test execution *********************
\vstest.console.exe "#C:\path\fadisfjla.tmp"
Microsoft (R) Test Execution Command Line Tool Version 16.4.0
Copyright (c) Microsoft Corporation. All rights reserved.
vstest.console.exe "C:\dir\Release\x64\bin\arm\MyApp.Test\testhost.dll"
"C:\dir\Release\x64\bin\arm\MyApp.Test\xunit.runner.visualstudio.uwp.testadapter.dll"
"C:\dir\Release\x64\bin\arm\ilc\MyApp.Test.dll"
"C:\dir\Release\x64\bin\x86\MyApp.Test\testhost.dll"
"C:\dir\Release\x64\bin\x86\MyApp.Test\xunit.runner.visualstudio.uwp.testadapter.dll"
"C:\dir\Release\x64\bin\x86\ilc\MyApp.Test.dll"
/Settings:"C:\tmp\fadslfj.tmp.runsettings"
/EnableCodeCoverage
/Logger:"trx"
/TestAdapterPath:"C:\dir\Release\x64"
Starting test execution, please wait...
Test run will use DLL(s) built for framework .NETFramework,Version=v4.0 and platform X86. Following DLL(s) do not match framework/platform settings.
testhost.dll is built for Framework .NETStandard,Version=v1.4 and Platform AnyCPU.
xunit.runner.visualstudio.uwp.testadapter.dll is built for Framework .NETCore,Version=v5.0 and Platform AnyCPU.
MyApp.Test.dll is built for Framework .NETFramework,Version=v4.0 and Platform ARM.
testhost.dll is built for Framework .NETStandard,Version=v1.4 and Platform AnyCPU.
xunit.runner.visualstudio.uwp.testadapter.dll is built for Framework .NETCore,Version=v5.0 and Platform AnyCPU.
Go to more details on managing these settings.
Microsoft (R) Coverage Collection Tool Version 16.0.30319.200
Copyright (c) Microsoft Corporation. All rights reserved.
1.5873
A total of 6 test files matched the specified pattern.
No test is available in C:\dir\Release\x64\bin\arm\MyApp.Test\testhost.dll C:\dir\Release\x64\bin\arm\MyApp.Test\xunit.runner.visualstudio.uwp.testadapter.dll C:\dir\Release\x64\bin\arm\ilc\MyApp.Test.dll C:\dir\Release\x64\bin\x86\MyApp.Test\testhost.dll C:\dir\Release\x64\bin\x86\MyApp.Test\xunit.runner.visualstudio.uwp.testadapter.dll C:\dir\Release\x64\bin\x86\ilc\MyApp.Test.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Microsoft (R) Coverage Collection Tool Version 16.0.30319.200
Copyright (c) Microsoft Corporation. All rights reserved.
Results File: C:\path\fdsfdsfd.trx
Attachments:
C:\path\file-dfsfdsfe.coverage
Vstest.console.exe exited with code 0.
In my project file
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.4.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
First, make sure you have added the xunit.runner.visualstudio package. And then make sure you have pointed to your generated test assemblies under Test selection/Test filesin Visual Studio Test task, for example:
**\bin\$(BuildConfiguration)\**\*test*.dll
!**\obj\**
!**\xunit.runner.visualstudio.testadapter.dll
!**\xunit.runner.visualstudio.dotnetcore.testadapter.dll
Check the following link:
https://xunit.net/docs/getting-test-results-in-azure-devops
It turns out that if You have UWP project for Windows version 1803, and refrence it from test project in this version it ignores all tests in test project. I think this is issue in xunit or windows sdk. If just test project is updated to 1903 it works flawlessly.
Recently our NUnit build configuration has occasionally stopped halfway through the tests, but the overall build outcome is successful . When I look at the build log, the last test that actually got executed shows:
Process exited with code -100 (Step: tests (NUnit))
and then the build stops. Under "Failure Conditions". Our NUnit Consol is 3.10.0 .
Below is our NUnit configuration image.
I've found this comment in the TeamCity YouTrack. Seems, dotnet projects aren't supported in NUnit build step.
Try to use .NET CLI build step with "dotnet test" command to run tests in this project. Does it work?
I've configured a VSTS build job to build my MockingFrameworkExamples .NET 4.7.1 (C#) solution from GitHub. This solution includes five assemblies with NUnit v3.10 unit tests.
I included a Visual Studio Test step in the build definition, but when it runs, the console output says no tests were available in the test assemblies:
No test is available in D:\a\1\s\MSFakesExamples\bin\Release\MSFakesExamples.dll D:\a\1\s\MoqExamples\bin\Release\MoqExamples.dll D:\a\1\s\NSubstituteExamples\bin\Release\NSubstituteExamples.dll D:\a\1\s\RhinoMocksExamples\bin\Release\RhinoMocksExamples.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
What do I need to change to have the test runner to find and run my tests?
My local Visual Studio 2017 instance has no trouble finding and running the tests. The documentation for the Visual Studio Test step says it will run NUnit tests:
Test frameworks that have a Visual Studio test adapter such as xUnit, NUnit, Chutzpah, etc. can also be run.
I've made sure the assemblies are actually building and I've also utilized the Typemock SmartRunner build step to run the tests, which finds and executes them (though, it fails with the MS Fakes assembly, so I can't just use it).
Below are the full build step configuration and the console output from the "Visual Studio Test" step. The build process is configured to run on a "Hosted VS2017" agent.
2018-07-19T18:28:28.1197107Z ##[section]Starting: VsTest - testAssemblies
2018-07-19T18:28:28.1205564Z ==============================================================================
2018-07-19T18:28:28.1205798Z Task : Visual Studio Test
2018-07-19T18:28:28.1206209Z Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test runner. Test frameworks that have a Visual Studio test adapter such as xUnit, NUnit, Chutzpah, etc. can also be run. Tests can be distributed on multiple agents using this task (version 2).
2018-07-19T18:28:28.1206596Z Version : 2.136.10
2018-07-19T18:28:28.1206775Z Author : Microsoft Corporation
2018-07-19T18:28:28.1207003Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=835764)
2018-07-19T18:28:28.1207231Z ==============================================================================
2018-07-19T18:28:28.6970694Z Run the tests locally using vstest.console.exe
2018-07-19T18:28:28.6971006Z ========================================================
2018-07-19T18:28:28.6971725Z Test selector : Test assemblies
2018-07-19T18:28:28.6972103Z Test assemblies : **\release\*examples*.dll,!**\release\typemock*examples*.dll,!**\obj\**
2018-07-19T18:28:28.6972430Z Test filter criteria : null
2018-07-19T18:28:28.6972706Z Search folder : D:\a\1\s
2018-07-19T18:28:28.6972990Z Run settings file : D:\a\1\s
2018-07-19T18:28:28.6973481Z Run in parallel : false
2018-07-19T18:28:28.6973748Z Run in isolation : false
2018-07-19T18:28:28.6975710Z Path to custom adapters : null
2018-07-19T18:28:28.6975982Z Other console options : null
2018-07-19T18:28:28.6976254Z Code coverage enabled : true
2018-07-19T18:28:28.6976788Z Rerun failed tests: false
2018-07-19T18:28:28.6977166Z VisualStudio version selected for test execution : latest
2018-07-19T18:28:29.7035629Z ========================================================
2018-07-19T18:28:30.0191054Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" #D:\a\_temp\88c64f61-8b81-11e8-a282-258e7155540f.txt
2018-07-19T18:28:33.5193511Z Microsoft (R) Test Execution Command Line Tool Version 15.7.2
2018-07-19T18:28:33.5198868Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-07-19T18:28:33.5199025Z
2018-07-19T18:28:33.5440200Z vstest.console.exe
2018-07-19T18:28:33.5441525Z "D:\a\1\s\MSFakesExamples\bin\Release\MSFakesExamples.dll"
2018-07-19T18:28:33.5442179Z "D:\a\1\s\MoqExamples\bin\Release\MoqExamples.dll"
2018-07-19T18:28:33.5442549Z "D:\a\1\s\NSubstituteExamples\bin\Release\NSubstituteExamples.dll"
2018-07-19T18:28:33.5442909Z "D:\a\1\s\RhinoMocksExamples\bin\Release\RhinoMocksExamples.dll"
2018-07-19T18:28:33.5443312Z /EnableCodeCoverage
2018-07-19T18:28:33.5443575Z /logger:"trx"
2018-07-19T18:28:35.6891585Z Starting test execution, please wait...
2018-07-19T18:28:42.3946126Z Microsoft (R) Coverage Collection Tool Version 15.0.30319.1
2018-07-19T18:28:42.3947458Z
2018-07-19T18:28:42.3947721Z
2018-07-19T18:28:42.3948539Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-07-19T18:28:42.3949162Z
2018-07-19T18:28:42.3949300Z
2018-07-19T18:28:42.3949487Z
2018-07-19T18:28:42.3949624Z
2018-07-19T18:28:42.6811429Z 2.7184
2018-07-19T18:28:53.8206723Z No test is available in D:\a\1\s\MSFakesExamples\bin\Release\MSFakesExamples.dll D:\a\1\s\MoqExamples\bin\Release\MoqExamples.dll D:\a\1\s\NSubstituteExamples\bin\Release\NSubstituteExamples.dll D:\a\1\s\RhinoMocksExamples\bin\Release\RhinoMocksExamples.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
2018-07-19T18:28:53.9442220Z Microsoft (R) Coverage Collection Tool Version 15.0.30319.1
2018-07-19T18:28:53.9443798Z
2018-07-19T18:28:53.9445199Z
2018-07-19T18:28:53.9465185Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-07-19T18:28:53.9465983Z
2018-07-19T18:28:53.9466184Z
2018-07-19T18:28:53.9466360Z
2018-07-19T18:28:53.9466554Z
2018-07-19T18:28:54.6483114Z
2018-07-19T18:28:54.6491201Z Attachments:
2018-07-19T18:28:54.6491635Z D:\a\1\s\TestResults\324c9712-62bd-4959-b3b6-40bebf7c05ec\VssAdministrator_factoryvm-az243 2018-07-19 18_28_41.coverage
2018-07-19T18:28:54.6491944Z
2018-07-19T18:28:54.6574103Z Additionally, path to test adapters can be specified using /TestAdapterPath command. Example /TestAdapterPath:<pathToCustomAdapters>.
2018-07-19T18:28:54.6717566Z ##[warning]No results found to publish.
2018-07-19T18:28:54.7119869Z ##[section]Finishing: VsTest - testAssemblies
It turns out I had to add a NuGet reference to each of the unit test assemblies to the NUnit3TestAdapter NuGet package for this to work. No other config changes were needed.
You need to specify the path to the NUnit adapter using /TestAdapterPath.