-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language server unable to start - dotnet --version
failure
#105
Comments
Yeah - I’m wondering if it’s some sort of race condition when waiting for the |
(thanks for taking the time to reproduce this issue!) |
You can set 2 environment variables before running the
|
Same here Downgraded to extension 0.4.6 and problem disappeared. |
If either if you get a chance, can you post the output when those 2 environment variables are set? I've checked the code changes between those versions and it looks like the logic for launching the |
Published v0.4.8 (may take a couple of minutes to show up in the gallery). Note: there is now an additional environment variable you can set ( So, just to summarise for anyone skipping to the end of this thread, these are the environment variables to set if you want to collect as much diagnostic information as possible:
🙂 |
How do I use |
Here's example output: |
Oops! Sorry, that was in a post on the other issue (tintoy/msbuild-project-tools-server#28) and I forgot to copy it over to here 🙂 It should be:
(you may need to update the paths for your local system to match the ones you see in the error message) |
|
Would you be able to try that on v0.4.8? The additional diagnostic info logging has only just been added to this latest version. |
I installed 0.4.8, restarted vscode, and the problem disappeared! |
I had this sneaking feeling that was going to be the case (gotta love heisenbugs!) 😂 |
If you're right and it's a heisenbug, you know it'll reappear as soon as you close this issue... |
Under 0.4.8, if I have the environment variables in place to log things, it all works; if I don't have the environment variables, it fails to start up. That makes me think the theory there's a race condition going on is possibly right on - the added logging provides just enough delay for the I/O buffer to finish writing the data and work. Looking at the area where From that comment: I suspect you might be seeing a known problem where there is a race condition between See the remarks here:
If you are calling return Process.WaitForExit(timeout); to this: bool result = Process.WaitForExit(timeout);
if (result)
{
Process.WaitForExit();
}
return result; Perhaps adding the second |
Ooh nice find! Thanks, I’ll give this a try tomorrow 🙂 |
Heisenbug is back. I'll guinea pig the next version for you when it's ready. |
Published v0.4.9 🙂 You can also install from this VSIX package: msbuild-project-tools-0.4.9.zip |
Works! ...for me. Thanks. The question is whether it works for @tillig as he seems able to collapse the wave function just by thinking about it. |
I'm back in business! 0.4.9 does appear to resolve the issue. Thanks for the quick turnaround! |
As of 0.4.7 of the plugin, it appears the detection logic for the .NET version has changed such that, at least in my environment, the detection consistently fails.
In 0.4.6 of the plugin, my output window shows the MSBuild language server starting up just fine:
However, in 0.4.7, I see
The 'dotnet --version' command did not return any output.
I've tried to run the language server manually and I get the same thing:
Reverting to 0.4.6, the same command is successful:
I've cloned the language server code and, at least on the
master
branch, running interactively things seem to work and it can detect, say, .NET 6.0.301. There aren't easy to determine tags for individual version releases so I haven't been able to go back in time and figure out what version of the language server is attached to what version of the plugin yet.If it helps, I'm on Mac OS Monterey 12.5.1, Intel hardware. VS Code 1.70.2.
The text was updated successfully, but these errors were encountered: