Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VstestV2 task changes to support VS2022 #15400

Merged
merged 2 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Tasks/VsTestV2/inputparser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions Tasks/VsTestV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 170,
"Patch": 1
"Minor": 195,
"Patch": 0
},
"demands": [
"vstest"
Expand Down
4 changes: 2 additions & 2 deletions Tasks/VsTestV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 170,
"Patch": 1
"Minor": 195,
"Patch": 0
},
"demands": [
"vstest"
Expand Down
9 changes: 7 additions & 2 deletions Tasks/VsTestV2/versionfinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down