File tree Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change 33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6- import { basename , join } from 'path' ;
6+ import { basename } from 'path' ;
77import { BaseEvent , WorkspaceInformationUpdated } from "../omnisharp/loggingEvents" ;
88import { BaseStatusBarItemObserver } from './BaseStatusBarItemObserver' ;
99import { EventType } from '../omnisharp/EventType' ;
@@ -27,22 +27,7 @@ export class ProjectStatusBarObserver extends BaseStatusBarItemObserver {
2727 let label : string ;
2828 let msbuild = event . info . MsBuild ;
2929 if ( msbuild && msbuild . SolutionPath ) {
30- if ( msbuild . SolutionPath . endsWith ( ".sln" ) ) {
31- label = basename ( msbuild . SolutionPath ) ;
32- }
33- else {
34- // a project file was open, determine which project
35- for ( const project of msbuild . Projects ) {
36- // Get the project name.
37- label = basename ( project . Path ) ;
38-
39- // The solution path is the folder containing the open project. Combine it with the
40- // project name and see if it matches the project's path.
41- if ( join ( msbuild . SolutionPath , label ) === project . Path ) {
42- break ;
43- }
44- }
45- }
30+ label = basename ( msbuild . SolutionPath ) ;
4631 this . SetAndShowStatusBar ( '$(file-directory) ' + label , 'o.pickProjectAndStart' ) ;
4732 }
4833 else {
Original file line number Diff line number Diff line change @@ -561,8 +561,8 @@ export class OmniSharpServer {
561561
562562 // To maintain previous behavior when there are mulitple targets available,
563563 // launch with first Solution or Folder target.
564- const firstFolderOrSolutionTarget = launchTargets . find ( target => target . kind == LaunchTargetKind . Folder )
565- ?? launchTargets . find ( target => target . kind == LaunchTargetKind . Solution ) ;
564+ const firstFolderOrSolutionTarget = launchTargets
565+ . find ( target => target . kind == LaunchTargetKind . Folder || target . kind == LaunchTargetKind . Solution ) ;
566566 if ( firstFolderOrSolutionTarget ) {
567567 return this . restart ( firstFolderOrSolutionTarget ) ;
568568 }
You can’t perform that action at this time.
0 commit comments