File tree Expand file tree Collapse file tree 1 file changed +14
-18
lines changed Expand file tree Collapse file tree 1 file changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -178,27 +178,23 @@ function isBlazorWebAssemblyHosted(project: protocol.MSBuildProject, isProjectBl
178178
179179async function isBlazorWebAssemblyProject ( project : MSBuildProject ) : Promise < boolean > {
180180 const projectDirectory = path . dirname ( project . Path ) ;
181- const launchSettingsPattern = new vscode . RelativePattern ( projectDirectory , '**/launchSettings.json' ) ;
182- const excludedPathPattern = `{${ Options . getExcludedPaths ( vscode , true ) . join ( ',' ) } }` ;
181+ const launchSettingsPath = path . join ( projectDirectory , 'Properties' , 'launchSettings.json' ) ;
183182
184- const launchSettings = await vscode . workspace . findFiles ( launchSettingsPattern , excludedPathPattern ) ;
185- if ( ! launchSettings ) {
186- return false ;
187- }
183+ try {
184+ if ( ! fs . pathExistsSync ( launchSettingsPath ) ) {
185+ return false ;
186+ }
187+
188+ const launchSettingContent = fs . readFileSync ( launchSettingsPath ) ;
189+ if ( ! launchSettingContent ) {
190+ return false ;
191+ }
188192
189- for ( const launchSetting of launchSettings ) {
190- try {
191- const launchSettingContent = fs . readFileSync ( launchSetting . fsPath ) ;
192- if ( ! launchSettingContent ) {
193- continue ;
194- }
195-
196- if ( launchSettingContent . indexOf ( '"inspectUri"' ) > 0 ) {
197- return true ;
198- }
199- } catch {
200- // Swallow IO errors from reading the launchSettings.json files
193+ if ( launchSettingContent . indexOf ( '"inspectUri"' ) > 0 ) {
194+ return true ;
201195 }
196+ } catch {
197+ // Swallow IO errors from reading the launchSettings.json files
202198 }
203199
204200 return false ;
You can’t perform that action at this time.
0 commit comments