azure-pipelines-tasks: System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name 'testSelector'.

I am using pretty much all of the defaults when trying to run unit tests as part of the automated build proces. It keeps failing with the error: System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name ‘testSelector’. LegacyVSTSPowerShellHost.exe completed with return code: -1.

Full Error:

Task : Visual Studio Test Description : Run tests with Visual Studio test runner Version : 1.0.84 Author : Microsoft Corporation Help : More Information

Preparing task execution handler. Executing the powershell script: D:\a_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\1.0.84\VSTest.ps1 !**\obj**) System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name ‘testSelector’. at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings) at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings) at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args) LegacyVSTSPowerShellHost.exe completed with return code: -1.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 26 (11 by maintainers)

Most upvoted comments

Ah I see the problem. You have a testsettings file. Do we need that? The new MSTest Framework no longer supports the legacy test settings. Can you please consider moving over to a runsettings?

Also make sure you set system.debug = true in definition before running the build