diff --git a/Tasks/VsTestV2/inputparser.ts b/Tasks/VsTestV2/inputparser.ts index 4a07341aa33a..4cd35bb2c1c8 100644 --- a/Tasks/VsTestV2/inputparser.ts +++ b/Tasks/VsTestV2/inputparser.ts @@ -528,8 +528,11 @@ function getTestPlatformPath(inputDataContract : idc.InputDataContract) { if (vsTestVersion.toLowerCase() === 'latest') { tl.debug('Searching for latest Visual Studio.'); - - let vstestconsolePath = getVSTestConsolePath('16.0', '17.0'); + let vstestconsolePath = getVSTestConsolePath('17.0', '18.0'); + if (vstestconsolePath) { + return path.join(vstestconsolePath, 'Common7', 'IDE', 'Extensions', 'TestPlatform'); + } + vstestconsolePath = getVSTestConsolePath('16.0', '17.0'); if (vstestconsolePath) { return path.join(vstestconsolePath, 'Common7', 'IDE', 'Extensions', 'TestPlatform'); } diff --git a/Tasks/VsTestV2/task.json b/Tasks/VsTestV2/task.json index 3c39b2fad3cd..dbed06bc9fe6 100644 --- a/Tasks/VsTestV2/task.json +++ b/Tasks/VsTestV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 170, - "Patch": 1 + "Minor": 195, + "Patch": 0 }, "demands": [ "vstest" diff --git a/Tasks/VsTestV2/task.loc.json b/Tasks/VsTestV2/task.loc.json index 47f94d33b379..e48983ff3066 100644 --- a/Tasks/VsTestV2/task.loc.json +++ b/Tasks/VsTestV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 170, - "Patch": 1 + "Minor": 195, + "Patch": 0 }, "demands": [ "vstest" diff --git a/Tasks/VsTestV2/versionfinder.ts b/Tasks/VsTestV2/versionfinder.ts index 6e3334df3b99..1115f0fbdaf0 100644 --- a/Tasks/VsTestV2/versionfinder.ts +++ b/Tasks/VsTestV2/versionfinder.ts @@ -90,8 +90,13 @@ function locateTestWindow(testConfig: models.TestConfigurations): string { if (testConfig.vsTestVersion.toLowerCase() === 'latest') { // latest tl.debug('Searching for latest Visual Studio'); - - let vstestconsolePath = getVSTestConsolePath('16.0', '17.0'); + + let vstestconsolePath = getVSTestConsolePath('17.0', '18.0'); + if (vstestconsolePath) { + testConfig.vsTestVersion = "17.0"; + return path.join(vstestconsolePath, 'Common7', 'IDE', 'Extensions', 'TestPlatform'); + } + vstestconsolePath = getVSTestConsolePath('16.0', '17.0'); if (vstestconsolePath) { testConfig.vsTestVersion = "16.0"; return path.join(vstestconsolePath, 'Common7', 'IDE', 'Extensions', 'TestPlatform');