Skip to content
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

Ensure the VSCode server process runs on non-preview runtime #70446

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

dibarbet
Copy link
Member

The change

Removes the RuntimeFrameworkVersion specified in the VSCode language server process (and adds logging as to which dotnet runtime the server and build host process are running on)

Why we specified RuntimeFrameworkVersion in the past

Specifying the RuntimeFrameworkVersion was an old hack that allowed the main server process to roll forward to run on preview runtimes. This was required to be able to load some projects using preview SDKs.

Why we don't need RuntimeFrameworkVersion now

We now launch a separate build host process with roll forward LatestMajor and DOTNET_ROLL_FORWARD_TO_PRERELEASE to 1. This will allow the build host to run and load the project on preview runtimes. It is not necessary for our main server process to run on preview runtimes.

Why this is changing now

Setting RuntimeFrameworkVersion to a preview version causes the language server to prefer to run on a preview version of .NET 7, even when a non-preview version of .NET 7 is installed.

This causes the exceptions noted in dotnet/vscode-csharp#6479 because the version of System.Text.Json in the .NET 7 Preview 7 SDK is missing the JsonRequiredAttribute. But the copy of Newtonsoft.Json in the server is expecting it to be present (and it is available in non-preview versions of .NET 7).

Note: if only a preview version of .NET 7 is installed it won't match our runtime version requirement and we will download a non-preview .NET 7 runtime (via the runtime installer extension).

Resolves dotnet/vscode-csharp#6479

@dibarbet dibarbet requested a review from a team as a code owner October 18, 2023 22:51
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 18, 2023
Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes only because I think you left a debugging edit in.

@dibarbet dibarbet force-pushed the remove_runtime_framework_version branch from 339ff83 to 69af321 Compare October 18, 2023 22:56
dibarbet and others added 2 commits October 18, 2023 15:56
Co-authored-by: Jason Malinowski <jason@jason-m.com>
…ver/Program.cs

Co-authored-by: Jason Malinowski <jason@jason-m.com>
@dibarbet dibarbet merged commit 39386f9 into dotnet:main Oct 19, 2023
23 of 24 checks passed
@ghost ghost added this to the Next milestone Oct 19, 2023
@dibarbet dibarbet deleted the remove_runtime_framework_version branch October 20, 2023 00:23
@jjonescz jjonescz modified the milestones: Next, 17.9 P1 Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Language Server Crashes
3 participants