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'
67
67
import { getDotnetInfo } from '../shared/utils/getDotnetInfo' ;
68
68
import { registerLanguageServerOptionChanges } from './optionChanges' ;
69
69
import { Observable } from 'rxjs' ;
70
+ import { DotnetInfo } from '../shared/utils/dotnetInfo' ;
70
71
71
72
let _languageServer : RoslynLanguageServer ;
72
73
let _channel : vscode . OutputChannel ;
@@ -209,8 +210,11 @@ export class RoslynLanguageServer {
209
210
} ) ;
210
211
211
212
// 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
+ }
214
218
reportProjectConfigurationEvent (
215
219
this . telemetryReporter ,
216
220
params ,
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export namespace ProjectInitializationCompleteNotification {
163
163
}
164
164
165
165
export namespace ProjectConfigurationNotification {
166
- export const method = 'workspace/projectConfiguration ' ;
166
+ export const method = 'workspace/projectConfigurationTelemetry ' ;
167
167
export const messageDirection : lsp . MessageDirection = lsp . MessageDirection . serverToClient ;
168
168
export const type = new lsp . NotificationType < ProjectConfigurationMessage > ( method ) ;
169
169
}
You can’t perform that action at this time.
0 commit comments