C# Dev Kit Extension Syntax Highlighting and Autocomplete Not Working After Updating to .NET 9
Hi everyone,
After updating to .NET 9, I noticed that the C# Dev Kit extension in VS Code is no longer providing syntax highlighting or autocomplete functionality.
I tried configuring the dotnetAcquisitionExtension.existingDotnetPath in my settings like this:
Unfortunately, this didn’t solve the issue.
22 Replies
Not sure what asdf is or what that shim is, but it's probably not going to work
DevKit needs the actual location of the SDK and supporting libraries, not some symlinked shim to
dotnet
I'm not sure what the shims are either, but this is the path I get when I run the
which dotnet
commandThe location of the exe is only part of the equation
You need the actual location of the SDK
I tried this path from the command
dotnet info
, but it says that the value did not meet the requirementsI'm honestly not sure how asdf is setting up this installation
You should be able to get more details from the output pane
It looks like the c# dev kit is still looking for the dotnet 8
To be clear, that's not devkit
That's the base extension you're looking at
But yes, it does look like it's still looking for 8
Try adding that and seeing if it works for you
It didn't work
but I think I found something here
the environment variable was wrong, after running the command
. ~/.asdf/plugins/dotnet-core/set-dotnet-home.zsh
to update it and also changing the dotnetAcquisitionExtension.existingDotnetPath to the following:
The error in the output dissapeared
but something is still missing because the autocomplete and syntax highlighting is not working
Do you have multiple solution files?
just one
Hmm. What happens if you run ".NET: Open Solution"?
Hmm. @shep, any ideas?
I believe this issue is the same as https://github.com/dotnet/vscode-csharp/issues/7925 , where the existingdotnetpath option has problems with symlink paths. But it looks like you got past that one
GitHub
can not run csharp lsp if net 9 installed even i installed net8,Ple...
Environment data dotnet --info output: .NET SDK: Version: 9.0.100 Commit: a2bc464e40 Workload version: 9.0.100-manifests.6bf02610 MSBuild version: 17.12.7+a2bc464e4 Runtime Environment: OS Name: ub...
For this, I can't as easily say, I would file an issue at https://github.com/microsoft/vscode-dotnettools/issues since it looks like a devkit problem
GitHub
Issues · microsoft/vscode-dotnettools
This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code - Issues · microsoft/vscode-dotnettools
In general I would recommend avoiding setting the existingdotnetpath setting if you already have dotnet available on the path
Thanks for the advice, I'll file the issue
I found the problem, this option when enabled, was causing the problem