-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I have been setting up an LSP implementation for Chocolatey nuspec files in VSCode, and this has been working well. I am now trying to take the same Language Server implementation and run it in Visual Studio. When I try this, I get the following error returned:
The code that I am using the initialise the client within Visual Studio is the following:
[ContentType("nuspec")]
[Export(typeof(ILanguageClient))]
public class ChocolateyLanguageClient : ILanguageClient
{
public string Name => "Chocolatey Language Server Client";
public IEnumerable<string> ConfigurationSections => null;
public object InitializationOptions => null;
public IEnumerable<string> FilesToWatch => null;
public event AsyncEventHandler<EventArgs> StartAsync;
public event AsyncEventHandler<EventArgs> StopAsync;
public async Task<Connection> ActivateAsync(CancellationToken token)
{
await Task.Yield();
var info = new ProcessStartInfo();
info.FileName = "dotnet";
info.Arguments = "C:\\github_local\\gep13\\chocolatey-vs\\lib\\ChocolateyLanguageServer\\Chocolatey.Language.Server.dll";
info.RedirectStandardInput = true;
info.RedirectStandardOutput = true;
info.UseShellExecute = false;
info.CreateNoWindow = true;
Process process = new Process();
process.StartInfo = info;
if (process.Start())
{
return new Connection(process.StandardOutput.BaseStream, process.StandardInput.BaseStream);
}
return null;
}
public async Task OnLoadedAsync()
{
await StartAsync?.InvokeAsync(this, EventArgs.Empty);
}
public Task OnServerInitializedAsync()
{
return Task.CompletedTask;
}
public Task OnServerInitializeFailedAsync(Exception e)
{
return Task.CompletedTask;
}
}
Is there additional configuration that needs to be provided, or is this a bug that needs to be addressed. Let me know if you need any further information.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working