File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ async function openSolution(languageServer: RoslynLanguageServer): Promise<vscod
178
178
return undefined ;
179
179
}
180
180
181
- const solutionFiles = await vscode . workspace . findFiles ( '**/*.sln' ) ;
181
+ const solutionFiles = await vscode . workspace . findFiles ( '**/*.{ sln,slnf} ' ) ;
182
182
const launchTargets = solutionFiles . map ( createLaunchTargetForSolution ) ;
183
183
const launchTarget = await vscode . window . showQuickPick ( launchTargets , {
184
184
matchOnDescription : true ,
Original file line number Diff line number Diff line change @@ -29,12 +29,14 @@ export interface LaunchTarget {
29
29
}
30
30
31
31
export function createLaunchTargetForSolution ( resource : vscode . Uri ) : LaunchTarget {
32
- const dirname = path . dirname ( resource . fsPath ) ;
32
+ const directoryPath = path . dirname ( resource . fsPath ) ;
33
+ const relativePath = vscode . workspace . asRelativePath ( directoryPath ) ;
33
34
return {
34
35
label : path . basename ( resource . fsPath ) ,
35
- description : vscode . workspace . asRelativePath ( dirname ) ,
36
+ // When the relativePath matches the directoryPath, it means we are in the root of the workspace.
37
+ description : directoryPath === relativePath ? '' : relativePath ,
36
38
target : resource . fsPath ,
37
- directory : path . dirname ( resource . fsPath ) ,
39
+ directory : directoryPath ,
38
40
workspaceKind : LaunchTargetKind . Solution ,
39
41
} ;
40
42
}
You can’t perform that action at this time.
0 commit comments