File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ import { reportProjectConfigurationEvent } from '../shared/projectConfiguration'
6767import { getDotnetInfo } from '../shared/utils/getDotnetInfo' ;
6868import { registerLanguageServerOptionChanges } from './optionChanges' ;
6969import { Observable } from 'rxjs' ;
70+ import { DotnetInfo } from '../shared/utils/dotnetInfo' ;
7071
7172let _languageServer : RoslynLanguageServer ;
7273let _channel : vscode . OutputChannel ;
@@ -209,8 +210,11 @@ export class RoslynLanguageServer {
209210 } ) ;
210211
211212 // Retrieve the dotnet info outside of the notification so we're not running dotnet --info every time the project changes.
212- const dotnetInfo = await getDotnetInfo ( [ ] ) ;
213- this . _languageClient . onNotification ( RoslynProtocol . ProjectConfigurationNotification . type , ( params ) => {
213+ let dotnetInfo : DotnetInfo | undefined = undefined ;
214+ this . _languageClient . onNotification ( RoslynProtocol . ProjectConfigurationNotification . type , async ( params ) => {
215+ if ( ! dotnetInfo ) {
216+ dotnetInfo = await getDotnetInfo ( [ ] ) ;
217+ }
214218 reportProjectConfigurationEvent (
215219 this . telemetryReporter ,
216220 params ,
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export namespace ProjectInitializationCompleteNotification {
163163}
164164
165165export namespace ProjectConfigurationNotification {
166- export const method = 'workspace/projectConfiguration ' ;
166+ export const method = 'workspace/projectConfigurationTelemetry ' ;
167167 export const messageDirection : lsp . MessageDirection = lsp . MessageDirection . serverToClient ;
168168 export const type = new lsp . NotificationType < ProjectConfigurationMessage > ( method ) ;
169169}
You can’t perform that action at this time.
0 commit comments