dotnet / dotnet/vscode-csharp

[BUG] Failed to initialize AssemblyLoadContext Microsoft.VisualStudio.LanguageServices.DevKit

Open
#6,154 1 comment 1 reaction 1 assignee Claimed by @dibarbet View on GitHub
Bug ExtensionManagement
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

From vscode-dotnettools created by [m4ss1m0g](https://github.com/m4ss1m0g): microsoft/vscode-dotnettools#301

### Describe the Issue

Using [scoop](https://scoop.sh/) (a package manager) for installing vscode on subsequential update when starting vscode broke the extension. On C# output the message is:

>fail: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Failed to initialize AssemblyLoadContext Microsoft.VisualStudio.LanguageServices.DevKit
System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\Users\user1\scoop\apps\vscode\1.80.1\data\extensions\ms-dotnettools.csdevkit-0.2.100-win32-x64\components\roslyn-visualstudio-languageservices-devkit\node_modules\@microsoft\visualstudio-languageservices-devkit'.

This error raises when I update the vscode from 1.80.1 to 1.80.2

### Steps To Reproduce

1. Install scoop
2. Install vscode with scoop `scoop install vscode`
3. Install the C# Dev KIt extension
4. Update vscode with scoop
5. Start vscode
6. On C# output there are the error above

### Expected Behavior

When updating vscode the extensions find the new path.

## Notes
I found the path on `C:\Users\user1\scoop\persist\vscode\data\extensions\ms-dotnettools.csdevkit-0.2.100-win32-x64\cache` directory.

Removing the folder and reload the vscode fix the error.

### Environment Information

- OS: Windows 11
- VSCode: 1.80.2
- Extension Version:
- C# Dev Kit v.0.2.100 preview
- C# v2.0.312 preview

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.