Unit tests run fine locally.
When run on the Visual Studio 2017 hosted build agent, the VSTest task fails with:
2018-12-08T10:42:16.3779907Z An exception occurred while invoking executor 'executor://mstestadapter/v2': Method 'get_Properties' in type 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation' from assembly 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50xx' does not have an implementation.
2018-12-08T10:42:17.7794385Z
TestAdapter and TestPlatform libraries have been uninstalled and reinstalled (version 1.3.2) using Nuget Package Manager and no references to other versions of these libraries exist in the solution.
To simplify, all unit test projects except for a single one (targetting .NET Framework 4.6.1) have been removed from the solution.
What could be causing the VSTest task to fail in Azure Devops Build?
Install Test Platformtask to ensure an appropriate version of the VSTest platform is installed? docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/… - Daniel MannInstall Test Platformtask, if the agent on which the build is running doesn't have Visual Studio installed. - René