dotnet / dotnet/vscode-csharp

C# prerelease generates error and never activates

Open
#5,828 6 comments 0 reactions 1 assignee Claimed by @dibarbet View on GitHub
Bug Needs Investigation Triaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

Hi!
I wanted to try the new LSP based extension, but it never activated. Apparently it doesn't work at all, since I can't even use the "report an issue" command. I tried activating Omnisharp to get the old behaviour with the new extension, but this didn't work either, the error is the same. I tried deactivating other extension, but nothing seems to influence this. Switching back to the release version for now.

The extension host give me the following error messages below:

```
2023-06-19 08:54:13.889 [error] Activating extension ms-dotnettools.csharp failed due to an error:
2023-06-19 08:54:13.889 [error] TypeError: Cannot read properties of undefined (reading 'scope')
at z.Hb (vscode-file://vscode-app/c:/Users/xxxxx/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2269:74144)
at async Promise.all (index 0)
at async Object.q [as settled] (vscode-file://vscode-app/c:/Users/xxxxxxAppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:97:21518)
at async z.updateValue (vscode-file://vscode-app/c:/Users/xxxxx/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2269:62177)
2023-06-19 08:54:15.386 [info] Eager extensions activated
```

## Environment data
`dotnet --info` output:
```
.NET SDK:
Version: 7.0.203
Commit: 5b005c19f5

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

Host:
Version: 7.0.5
Architecture: x64
Commit: 8042d61b17

.NET SDKs installed:
7.0.203 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

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

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

VS Code version:
1.79.2
C# Extension version:
v2.0.212

## OmniSharp log
not present as the extension doesn't start

## Steps to reproduce
Install prerelease extension, open Workspace that used to work before.

## Expected behavior
Expected to get Intellisense as usual.

## Actual behavior
Nothing, the extension didn't start.

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.