@@ -8,6 +8,7 @@ import * as path from 'path';
8
8
import * as cp from 'child_process' ;
9
9
import * as uuid from 'uuid' ;
10
10
import * as net from 'net' ;
11
+ import * as fs from 'fs' ;
11
12
import * as util from '../../common' ;
12
13
import {
13
14
LanguageClientOptions ,
@@ -106,11 +107,10 @@ export class RoslynLanguageServer {
106
107
private static _processId : number | undefined ;
107
108
108
109
/**
109
- * The folder name for the Roslyn Copilot language server extension .
110
+ * The folder name for the Roslyn Copilot language server dll .
110
111
*/
111
- private static readonly _copilotLanguageServerExtensionDirName = '.roslyncopilotlanguageserver' ;
112
- private static readonly _copilotLanguageServerExtensionAssemblyName =
113
- 'Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer.dll' ;
112
+ private static readonly _copilotLanguageServerDllDirName = '.roslyncopilot' ;
113
+ private static readonly _copilotLanguageServerDllName = 'Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer.dll' ;
114
114
115
115
/**
116
116
* The solution file previously opened; we hold onto this so we can send this back over if the server were to be relaunched for any reason, like some other configuration
@@ -1083,20 +1083,19 @@ export class RoslynLanguageServer {
1083
1083
await exports . setupTelemetryEnvironmentAsync ( env ) ;
1084
1084
}
1085
1085
1086
- const copilotServerExtensionfolder = path . join (
1086
+ const copilotServerExtensionFullPath = path . join (
1087
1087
util . getExtensionPath ( ) ,
1088
- RoslynLanguageServer . _copilotLanguageServerExtensionDirName
1088
+ RoslynLanguageServer . _copilotLanguageServerDllDirName ,
1089
+ RoslynLanguageServer . _copilotLanguageServerDllName
1089
1090
) ;
1090
1091
1091
- if ( copilotServerExtensionfolder ) {
1092
- const copilotServerExtensionFullPath = path . join (
1093
- copilotServerExtensionfolder ,
1094
- RoslynLanguageServer . _copilotLanguageServerExtensionAssemblyName
1095
- ) ;
1092
+ if ( fs . existsSync ( copilotServerExtensionFullPath ) ) {
1096
1093
additionalExtensionPaths . push ( copilotServerExtensionFullPath ) ;
1097
1094
channel . trace (
1098
- `CSharp DevKit contributes Copilot langauge server extension: ${ copilotServerExtensionFullPath } `
1095
+ `CSharp DevKit contributes Copilot language server extension: ${ copilotServerExtensionFullPath } `
1099
1096
) ;
1097
+ } else {
1098
+ channel . debug ( `Copilot language server extension not found at: ${ copilotServerExtensionFullPath } ` ) ;
1100
1099
}
1101
1100
}
1102
1101
0 commit comments