qsharp-compiler icon indicating copy to clipboard operation
qsharp-compiler copied to clipboard

Could not find language server executable to spawn.

Open raffaeleterribile opened this issue 3 years ago • 2 comments

Hi.

I've developed a Q# application, but I have an error everytime I open the solution. I see messages about downloading on the Q# Language Server and I always get this error:

[Error - 23:18:56] Starting client failed Error: Could not find language server executable to spawn. at LanguageServer. (.vscode\extensions\quantum.quantum-devkit-vscode-0.21.2112180703\out\languageServer.js:283:27) at Generator.next () at fulfilled (.vscode\extensions\quantum.quantum-devkit-vscode-0.21.2112180703\out\languageServer.js:7:58)

I have uninstalled and reinstalled Microsoft Quantum Development Kit several times.

Opening the solution with Visual Studio 2019, I get this error:

System.InvalidOperationException: No process is associated with this object. at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.get_HasExited() at Microsoft.Quantum.QsCompiler.ProcessRunner.Run(String command, String args, StringBuilder& outstream, StringBuilder& errstream, Int32& exitCode, Exception& ex, IDictionary`2 envVariables, Int32 timeout, Int32 exitCodeOnTimeOut) at Microsoft.Quantum.QsCompiler.CompilationBuilder.CompilationUnitManager.<>c__DisplayClass46_0.<Formatting>g__FormatFile|0(FileContentManager file) at Microsoft.Quantum.QsCompiler.CompilationBuilder.CompilationUnitManager.<>c__DisplayClass46_0.<Formatting>b__2(FileContentManager file, CompilationUnit _) at Microsoft.Quantum.QsCompiler.CompilationBuilder.CompilationUnitManager.<FileQuery>g__TryQueryFile|47_0[T](FileContentManager f, <>c__DisplayClass47_0`1& )

raffaeleterribile avatar Jan 22 '22 22:01 raffaeleterribile

@raffaeleterribile Could you please quickly double check if you have configured a custom path for the language server in the extension setting? In the VS Code menu, go to File/Code -> Preferences -> Settings, scroll down to Extensions -> Q# Language Server Configuration and click on Edit in settings.json. Does that file contain a key "quantumDevKit.languageServerPath"? If it doesn't could you please let us know the operating system and extension version you are working with?

@ricardo-espinoza @cgranade For further follow up.

bettinaheim avatar Jan 24 '22 17:01 bettinaheim

Sorry, I didn't notice your response... I've checked the custom path and tried both to leave it as an empty string and to point to the effective language server path.

raffaeleterribile avatar Jan 25 '22 13:01 raffaeleterribile