New issue checklist
Task name
vstest@2
Breaking task version
2.272.0
Last working task version
2.271.0
Regression Description
We're running Visual Studio Enterprise 2022 v17.14.30, and together with vstest@2 (2.272.0) we encounter the following problem in our pipelines:
##[error]Error reading the version of vstest.console.exe.
##[error]Error: Error reading the version of vstest.console.exe.
If we roll back to version 2.271.0, the pipeline can execute again. We tried upgrading to @3 (3.272.0), but the same error is present.
The version of the installed vstest is:

Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
Azure DevOps Server (Please specify exact version in the textbox below)
Azure DevOps Server Version (if applicable)
Azure DevOps Server 2022.1 (AzureDevOpsServer_20231109.2)
Operation system
Windows Server 2016 Standard
Relevant log output
Starting: Run Unit tests
==============================================================================
Task : Visual Studio Test (Side-by-side)
Description : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2 and later).
Version : 2.272.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/vstest
==============================================================================
Running tests using vstest.console.exe runner.
======================================================
Test selector : Test assemblies
Test filter criteria : undefined
Search folder : E:\agent2\_work\459\a
Action when minimum tests threshold not met : donothing
Minimum tests expected to be run: 0
VisualStudio version selected for test execution : latest
Attempting to find vstest.console from a visual studio installation with version [17.0,18.0).
Run settings file : E:\agent2\_work\459\s\.runsettings
Run in parallel : true
Run in isolation : true
Path to custom adapters : undefined
Other console options : /Framework:framework45 /Platform:x64
Code coverage enabled : true
Diagnostics enabled : false
Run the tests locally using vstest.console.exe
========================================================
Test selector : Test assemblies
Test assemblies : [ '**\\*test*.dll', '!**\\obj\\**' ]
Test filter criteria : undefined
Search folder : E:\agent2\_work\459\a
Run settings file : E:\agent2\_work\459\s\.runsettings
Run in parallel : true
Run in isolation : true
Path to custom adapters : undefined
Other console options : /Framework:framework45 /Platform:x64
Code coverage enabled : true
Diagnostics enabled : false
Rerun failed tests: false
VisualStudio version selected for test execution : latest
Attempting to find vstest.console from a visual studio installation with version [17.0,18.0).
##[error]Error reading the version of vstest.console.exe.
##[error]Error: Error reading the version of vstest.console.exe.
======================================================
Finishing: Run Unit tests
Full task logs with system.debug enabled
No response
Repro steps
New issue checklist
Task name
vstest@2
Breaking task version
2.272.0
Last working task version
2.271.0
Regression Description
We're running Visual Studio Enterprise 2022 v17.14.30, and together with vstest@2 (2.272.0) we encounter the following problem in our pipelines:
##[error]Error reading the version of vstest.console.exe.
##[error]Error: Error reading the version of vstest.console.exe.
If we roll back to version 2.271.0, the pipeline can execute again. We tried upgrading to @3 (3.272.0), but the same error is present.
The version of the installed vstest is:

Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
Azure DevOps Server (Please specify exact version in the textbox below)
Azure DevOps Server Version (if applicable)
Azure DevOps Server 2022.1 (AzureDevOpsServer_20231109.2)
Operation system
Windows Server 2016 Standard
Relevant log output
Full task logs with system.debug enabled
No response
Repro steps