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

Error when loading net60 projects when only the 6.0 SDK is installed #6801

Closed
Martizs opened this issue Jan 11, 2024 · 2 comments · Fixed by dotnet/roslyn#71597
Closed

Error when loading net60 projects when only the 6.0 SDK is installed #6801

Martizs opened this issue Jan 11, 2024 · 2 comments · Fixed by dotnet/roslyn#71597
Assignees
Milestone

Comments

@Martizs
Copy link

Martizs commented Jan 11, 2024

Type: Bug

Issue Description

Updated from version 2.14.8 to 2.15.30 . And Error underlines, navigation & suggested variables doesn't seem to be working anymore.

Steps to Reproduce

  1. Install version 2.14.8
  2. Enable it workspace wise
  3. Create a workspace file and save
  4. Verify nav, suggestions and syntax checks are working.
  5. Update to 2.15.30
  6. Reload.
  7. Verify nav, suggestions and syntax checks are NOT working.

Expected Behavior

Nav, suggestions and syntax checks should be working.

Actual Behavior

nav, suggestions and syntax checks are NOT working.

Logs

C# log

Archived log folders with that trace thing enabled - # https://drive.google.com/file/d/1Smj0M9HRnWa2Bi1u12sThhUsiyUycJ49/view?usp=drive_link # https://drive.google.com/file/d/1e3Vipub35rAVFzJFqcQT6XbEOq_lxPw4/view?usp=drive_link

C# LSP Trace Logs

Archived log folders with that trace thing enabled - # https://drive.google.com/file/d/1Smj0M9HRnWa2Bi1u12sThhUsiyUycJ49/view?usp=drive_link # https://drive.google.com/file/d/1e3Vipub35rAVFzJFqcQT6XbEOq_lxPw4/view?usp=drive_link

Environment information

VSCode version: 1.85.1
C# Extension: 2.14.8
Using OmniSharp: false

Dotnet Information

Host:
Version: 7.0.15
Architecture: x64
Commit: 8f4568cdaa

.NET SDKs installed:
No SDKs were found.

.NET runtimes installed:
Microsoft.NETCore.App 7.0.15 [c:\Users\elbar\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime.dotnet\7.0.15~x64\shared\Microsoft.NETCore.App]

Other architectures found:
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
csharp ms-dotnettools 2.14.8 ms-dotnettools.csharp-2.14.8-win32-x64
csharpier-vscode csharpier 1.5.2 csharpier.csharpier-vscode-1.5.2
unity-code-snippets kleber-swf 2.2.5 kleber-swf.unity-code-snippets-2.2.5
vscode-dotnet-runtime ms-dotnettools 2.0.0 ms-dotnettools.vscode-dotnet-runtime-2.0.0
vsliveshare ms-vsliveshare 1.0.5900 ms-vsliveshare.vsliveshare-1.0.5900

Extension version: 2.15.30
VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9900X CPU @ 3.50GHz (20 x 3504)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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.71GB (14.02GB free)
Process Argv D:\Projects\Unity\ZomberKiller -g D:\Projects\Unity\ZomberKiller\Assets\Scripts\EnemyAi.cs:1:0 --crash-reporter-id f02cbb6a-9487-4e18-b058-ca6d1729de4d
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30933248
pythongtdpath:30769146
i26e3531:30792625
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30928863
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019a:30933241

@dibarbet
Copy link
Member

The error in the failed logs:

[BuildHost PID 29136] Message from Process: Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
[BuildHost PID 29136] Message from Process: File name: 'System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[BuildHost PID 29136] Message from Process:    at Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.Program.Main(String[] args)
[BuildHost PID 29136] Message from Process:    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
[BuildHost PID 29136] Message from Process:    at Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.Program.Main(String[] args)
[BuildHost PID 29136] Message from Process:    at Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.Program.<Main>(String[] args)

In the prior working version we get:

[BuildHost PID 39120] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.BuildHost[0]
[BuildHost PID 39120] Message from Process:       Registered MSBuild instance at C:\Program Files\dotnet\sdk\6.0.405

@dibarbet dibarbet added this to the January2024 milestone Jan 11, 2024
@dibarbet dibarbet self-assigned this Jan 11, 2024
@dibarbet
Copy link
Member

As a temporary workaround in 2.15, you can set the dotnet.server.path option to the location of the Microsoft.CodeAnalysis.LanguageServer.dll in your extensions directory, e.g. C:\Users\WDAGUtilityAccount\.vscode\extensions\ms-dotnettools.csharp-2.15.30-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.dll and reloading the window.

You can find the extensions directory by running this command in vscode:
image

@jasonmalinowski jasonmalinowski changed the title updating to v2.15.30 doesn't seem to work Error when loading net60 projects when only the 6.0 SDK is installed Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants