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

C# & C# Dev Kit & C# IntelliCode #6159

Closed
NKFahrni opened this issue Aug 17, 2023 · 9 comments
Closed

C# & C# Dev Kit & C# IntelliCode #6159

NKFahrni opened this issue Aug 17, 2023 · 9 comments

Comments

@NKFahrni
Copy link

NKFahrni commented Aug 17, 2023

Type: Bug

Issue Description

I updated C# to the newest Version (v2.0.376) and C# Dev Kit (pre-release v0.4.5). After that I restarted the languageserver. This did not change the fact, that C# Intellicode could not analyze my code. The Syntax highlighting failed. I looked at the output panel in Visual Studio Code and found, that the Extensions required a dotnet version that doesnt exist (7.0.100).

Steps to Reproduce

Install all C# Extension (C#, C# Dev Kit, C# IntelliCode)
Open a C# Project.

Expected Behavior

Code gets highlighted and IntelliCode analyzes the code.

Actual Behavior

The code highlighting doent work and IntelliCode doesnt analyze the code

Logs

Logs.txt

C# log

Activating C# + C# Dev Kit + C# IntelliCode... [Info - 8:52:31 AM] [Program]Language server initialized [Info - 9:12:57 AM] Shutting down Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime Found dotnet version 7.0.10. Minimum required version is 7.0.100.

C# LSP Trace Logs

Extension vscode.bat does not contribute csharpExtensionLoadPaths Extension vscode.clojure does not contribute csharpExtensionLoadPaths Extension vscode.coffeescript does not contribute csharpExtensionLoadPaths Extension vscode.configuration-editing does not contribute csharpExtensionLoadPaths Extension vscode.cpp does not contribute csharpExtensionLoadPaths Extension vscode.csharp does not contribute csharpExtensionLoadPaths Extension vscode.css does not contribute csharpExtensionLoadPaths Extension vscode.css-language-features does not contribute csharpExtensionLoadPaths Extension vscode.dart does not contribute csharpExtensionLoadPaths Extension vscode.debug-auto-launch does not contribute csharpExtensionLoadPaths Extension vscode.debug-server-ready does not contribute csharpExtensionLoadPaths Extension vscode.diff does not contribute csharpExtensionLoadPaths Extension vscode.docker does not contribute csharpExtensionLoadPaths Extension vscode.emmet does not contribute csharpExtensionLoadPaths Extension vscode.extension-editing does not contribute csharpExtensionLoadPaths Extension vscode.fsharp does not contribute csharpExtensionLoadPaths Extension vscode.git does not contribute csharpExtensionLoadPaths Extension vscode.git-base does not contribute csharpExtensionLoadPaths Extension vscode.github does not contribute csharpExtensionLoadPaths Extension vscode.github-authentication does not contribute csharpExtensionLoadPaths Extension vscode.go does not contribute csharpExtensionLoadPaths Extension vscode.groovy does not contribute csharpExtensionLoadPaths Extension vscode.grunt does not contribute csharpExtensionLoadPaths Extension vscode.gulp does not contribute csharpExtensionLoadPaths Extension vscode.handlebars does not contribute csharpExtensionLoadPaths Extension vscode.hlsl does not contribute csharpExtensionLoadPaths Extension vscode.html does not contribute csharpExtensionLoadPaths Extension vscode.html-language-features does not contribute csharpExtensionLoadPaths Extension vscode.ini does not contribute csharpExtensionLoadPaths Extension vscode.ipynb does not contribute csharpExtensionLoadPaths Extension vscode.jake does not contribute csharpExtensionLoadPaths Extension vscode.java does not contribute csharpExtensionLoadPaths Extension vscode.javascript does not contribute csharpExtensionLoadPaths Extension vscode.json does not contribute csharpExtensionLoadPaths Extension vscode.json-language-features does not contribute csharpExtensionLoadPaths Extension vscode.julia does not contribute csharpExtensionLoadPaths Extension vscode.latex does not contribute csharpExtensionLoadPaths Extension vscode.less does not contribute csharpExtensionLoadPaths Extension vscode.log does not contribute csharpExtensionLoadPaths Extension vscode.lua does not contribute csharpExtensionLoadPaths Extension vscode.make does not contribute csharpExtensionLoadPaths Extension vscode.markdown does not contribute csharpExtensionLoadPaths Extension vscode.markdown-language-features does not contribute csharpExtensionLoadPaths Extension vscode.markdown-math does not contribute csharpExtensionLoadPaths Extension vscode.media-preview does not contribute csharpExtensionLoadPaths Extension vscode.merge-conflict does not contribute csharpExtensionLoadPaths Extension vscode.microsoft-authentication does not contribute csharpExtensionLoadPaths Extension ms-vscode-remote.remote-wsl-recommender does not contribute csharpExtensionLoadPaths Extension ms-vscode.js-debug does not contribute csharpExtensionLoadPaths Extension ms-vscode.js-debug-companion does not contribute csharpExtensionLoadPaths Extension ms-vscode.vscode-js-profile-table does not contribute csharpExtensionLoadPaths Extension vscode.builtin-notebook-renderers does not contribute csharpExtensionLoadPaths Extension vscode.npm does not contribute csharpExtensionLoadPaths Extension vscode.objective-c does not contribute csharpExtensionLoadPaths Extension vscode.perl does not contribute csharpExtensionLoadPaths Extension vscode.php does not contribute csharpExtensionLoadPaths Extension vscode.php-language-features does not contribute csharpExtensionLoadPaths Extension vscode.powershell does not contribute csharpExtensionLoadPaths Extension vscode.pug does not contribute csharpExtensionLoadPaths Extension vscode.python does not contribute csharpExtensionLoadPaths Extension vscode.r does not contribute csharpExtensionLoadPaths Extension vscode.razor does not contribute csharpExtensionLoadPaths Extension vscode.references-view does not contribute csharpExtensionLoadPaths Extension vscode.restructuredtext does not contribute csharpExtensionLoadPaths Extension vscode.ruby does not contribute csharpExtensionLoadPaths Extension vscode.rust does not contribute csharpExtensionLoadPaths Extension vscode.scss does not contribute csharpExtensionLoadPaths Extension vscode.search-result does not contribute csharpExtensionLoadPaths Extension vscode.shaderlab does not contribute csharpExtensionLoadPaths Extension vscode.shellscript does not contribute csharpExtensionLoadPaths Extension vscode.simple-browser does not contribute csharpExtensionLoadPaths Extension vscode.sql does not contribute csharpExtensionLoadPaths Extension vscode.swift does not contribute csharpExtensionLoadPaths Extension vscode.theme-abyss does not contribute csharpExtensionLoadPaths Extension vscode.theme-defaults does not contribute csharpExtensionLoadPaths Extension vscode.theme-kimbie-dark does not contribute csharpExtensionLoadPaths Extension vscode.theme-monokai does not contribute csharpExtensionLoadPaths Extension vscode.theme-monokai-dimmed does not contribute csharpExtensionLoadPaths Extension vscode.theme-quietlight does not contribute csharpExtensionLoadPaths Extension vscode.theme-red does not contribute csharpExtensionLoadPaths Extension vscode.vscode-theme-seti does not contribute csharpExtensionLoadPaths Extension vscode.theme-solarized-dark does not contribute csharpExtensionLoadPaths Extension vscode.theme-solarized-light does not contribute csharpExtensionLoadPaths Extension vscode.theme-tomorrow-night-blue does not contribute csharpExtensionLoadPaths Extension vscode.typescript does not contribute csharpExtensionLoadPaths Extension vscode.typescript-language-features does not contribute csharpExtensionLoadPaths Extension vscode.vb does not contribute csharpExtensionLoadPaths Extension vscode.xml does not contribute csharpExtensionLoadPaths Extension vscode.yaml does not contribute csharpExtensionLoadPaths Extension Azurite.azurite does not contribute csharpExtensionLoadPaths Extension codezombiech.gitignore does not contribute csharpExtensionLoadPaths Extension eamodio.gitlens does not contribute csharpExtensionLoadPaths Extension EditorConfig.EditorConfig does not contribute csharpExtensionLoadPaths Extension mhutchie.git-graph does not contribute csharpExtensionLoadPaths Extension ms-azuretools.vscode-azurefunctions does not contribute csharpExtensionLoadPaths Extension ms-azuretools.vscode-azureresourcegroups does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.csdevkit does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.csharp does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.vscode-dotnet-runtime does not contribute csharpExtensionLoadPaths Extension ms-dotnettools.vscodeintellicode-csharp does not contribute csharpExtensionLoadPaths Extension ms-vscode.azure-account does not contribute csharpExtensionLoadPaths Extension PKief.material-icon-theme does not contribute csharpExtensionLoadPaths Extension wraith13.bracket-lens does not contribute csharpExtensionLoadPaths

Environment information

VSCode version: 1.81.1
C# Extension: 2.0.376
Using OmniSharp: false

Dotnet Information .NET SDK (reflecting any global.json): Version: 6.0.413 Commit: 10710f7d8e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.413\

Host:
Version: 7.0.10
Architecture: x64
Commit: a6dbb800a4

.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.303 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.316 [C:\Program Files\dotnet\sdk]
6.0.402 [C:\Program Files\dotnet\sdk]
6.0.413 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
arm64 [C:\Program Files\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation]
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
azure-account ms-vscode 0.11.5 ms-vscode.azure-account-0.11.5
azurite Azurite 3.26.0 azurite.azurite-3.26.0
bracket-lens wraith13 1.5.3 wraith13.bracket-lens-1.5.3
csdevkit ms-dotnettools 0.4.5 ms-dotnettools.csdevkit-0.4.5-win32-x64
csharp ms-dotnettools 2.0.376 ms-dotnettools.csharp-2.0.376-win32-x64
EditorConfig EditorConfig 0.16.4 editorconfig.editorconfig-0.16.4
git-graph mhutchie 1.30.0 mhutchie.git-graph-1.30.0
gitignore codezombiech 0.9.0 codezombiech.gitignore-0.9.0
gitlens eamodio 14.2.1 eamodio.gitlens-14.2.1
material-icon-theme PKief 4.29.0 pkief.material-icon-theme-4.29.0
vscode-azurefunctions ms-azuretools 1.12.3 ms-azuretools.vscode-azurefunctions-1.12.3
vscode-azureresourcegroups ms-azuretools 0.7.5 ms-azuretools.vscode-azureresourcegroups-0.7.5
vscode-dotnet-runtime ms-dotnettools 1.7.0 ms-dotnettools.vscode-dotnet-runtime-1.7.0
vscodeintellicode-csharp ms-dotnettools 0.1.26 ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64

Extension version: 2.0.376
VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.72GB (18.97GB free)
Process Argv --file-uri file:///c%3A/Git/work/Repos/Sika/Repos/sika.code-workspace --crash-reporter-id 18048bfa-0748-473c-ae5c-f4c05a65b254
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263cf:30792227
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30803844
282f8724:30602487
89544117:30613380
showlangstatbar:30737416
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofb:30804716
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30812748

se it was too large to send. Please paste.
@NKFahrni NKFahrni changed the title C# & C# Dev Kit & C3 IntelliCode C# & C# Dev Kit & C# IntelliCode Aug 17, 2023
@kbegiedza
Copy link

Same problem described here: #6004 (comment) in #6004

@dibarbet
Copy link
Member

The dotnet error is tracked by #6167 , but it shouldn't cause highlighting to disappear.

After that I restarted the languageserver.

Can you clarify exactly which command you invoked? There is currently a bug where lose project information when you only run the
image
command, see #5882

If you reload the window instead, does it work?

@dibarbet dibarbet added this to the August milestone Aug 19, 2023
@dibarbet dibarbet self-assigned this Aug 19, 2023
@NKFahrni
Copy link
Author

The dotnet error is tracked by #6167 , but it shouldn't cause highlighting to disappear.

After that I restarted the languageserver.

Can you clarify exactly which command you invoked? There is currently a bug where lose project information when you only run the image command, see #5882

If you reload the window instead, does it work?

I envoke the .NET: Restart Language Server command. No reloading the window, restarting vsc does not work.

I also found out, that this only happens when all 3 Extensions are running, but if I deactivate Dev Kit and Intellicode, it works like usual.

@ugurozturk
Copy link

ugurozturk commented Aug 20, 2023

I think it's related to PR #6175 . it's fixed

Deactivating Dev kit makes OmniSharp run. Otherwise native .net api runs.

@NKFahrni
Copy link
Author

I'm currently still getting the same version error required version is 7.0.100, I take it, this is because I dont have the newest fixed version of the Extension?
I will either close this issue or comment again, depending if the next version fixed this for me.
Thanks for the help.

@anes-hamidi
Copy link

anes-hamidi commented Aug 21, 2023

.net 7.0.1 existed here .Net_latest _version

@NKFahrni
Copy link
Author

.net 7.0.1 existed here .Net_latest _version

Thanks for the response, I might have misunderstood the fix for my problem. My current Project is in .Net 6, do I still need to have .Net 7.0.1 installed for the extension to work?
I was talking about the new extension version, not the C# Version.

@ugurozturk
Copy link

ugurozturk commented Aug 27, 2023

@NKFahrni can you check again ? https://github.com/dotnet/vscode-csharp/releases/tag/v2.0.413 After extension update to 2.0.413 it must be fixed now

Edit : We might need vscode upgrade, im not sure

@NKFahrni
Copy link
Author

The Output of the C# extension on my first reload got me the following message:

[Error - 8:48:19 AM] [LanguageServerHost]System.InvalidOperationException: Was not able to get hello world response from remote - line 39
at Roslyn.Utilities.Contract.Fail(String message, Int32 lineNumber) in //src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Utilities/Contract.cs:line 154
at Microsoft.CodeAnalysis.LanguageServer.BrokeredServices.Services.HelloWorld.RemoteHelloWorldProvider.SayHelloToRemoteServerAsync(CancellationToken cancellationToken) in /
/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/BrokeredServices/Services/HelloWorld/RemoteHelloWorldProvider.cs:line 39
at Microsoft.CodeAnalysis.LanguageServer.BrokeredServices.ServiceBrokerFactory.CreateAndConnectAsync(String brokeredServicePipeName) in //src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/BrokeredServices/ServiceBrokerFactory.cs:line 82
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) in /
/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136
[Info - 8:48:37 AM] Shutting down
Using dotnet configured on PATH
Dotnet path: C:\Program Files\dotnet\dotnet.exe
Activating C# + C# Dev Kit + C# IntelliCode...

So I tried again and got this and now it seems to be working!

[Info - 8:48:39 AM] [Program]Language server initialized
[Info - 8:48:39 AM] [LanguageServerProjectSystem]Loaded MSBuild at C:\Program Files\dotnet\sdk\6.0.413
[Info - 8:48:40 AM] [LanguageServerProjectSystem]Successfully completed load of c:<Path>
[Info - 8:48:40 AM] [LanguageServerProjectSystem]Completed (re)load of all projects in 00:00:01.0806994

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants