dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 672 forks source link

Cannot open multiple Unity projects at the same time #5515

Open sbfkcel opened 1 year ago

sbfkcel commented 1 year ago

Issue Description

Unity project, cannot open multiple projects

Steps to Reproduce

image

Expected Behavior

No prompts will pop up, and everything is fine.

Actual Behavior

A prompt window pops up and the language server is unavailable

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.74.2 C# Extension: 1.25.2

Mono Information There is a problem with running OmniSharp on mono: Error: Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable.
Dotnet Information Command failed: dotnet --version /bin/sh: dotnet: command not found
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |beautify|HookyQR|1.5.0| |better-comments|aaron-bond|3.0.2| |comment-translate|intellsmi|2.2.4| |csharp|ms-dotnettools|1.25.2| |eslint-rules-zh-plugin|maggie|0.2.1| |file-path-bar|wraith13|2.1.7| |git-graph|mhutchie|1.30.0| |markdown-mermaid|bierner|1.17.3| |material-icon-theme|PKief|4.23.1| |material-theme|zhuangtongfa|3.15.6| |mermaid-markdown-syntax-highlighting|bpruitt-goddard|1.5.0| |path-intellisense|christian-kohler|2.8.4| |remote-explorer|ms-vscode|0.0.3| |remote-ssh|ms-vscode-remote|0.94.0| |remote-ssh-edit|ms-vscode-remote|0.84.0| |rust-analyzer|rust-lang|0.3.1348| |simple-react-snippets|burkeholland|1.2.7| |unity-debug|deitry|3.0.11| |vscode-deno|denoland|3.15.0| |vscode-docker|ms-azuretools|1.23.3| |vscode-drawio|hediet|1.6.4| |vscode-eslint|dbaeumer|2.2.6| |vscode-gutter-preview|kisstkondoros|0.30.0| |vscode-jest|Orta|5.1.0| |vscode-language-pack-zh-hans|MS-CEINTL|1.74.12140931| |vscode-markdown-paste-image|telesoho|0.19.4| |vscode-vlang|vlanguage|0.1.14|;
sbfkcel commented 1 year ago

The problem is the same as here

https://github.com/OmniSharp/omnisharp-vscode/issues/5454#issuecomment-1356354392

doseonfairsutdios commented 1 year ago

Same issue in C# Extension 1.25.4 version

heshuimu commented 1 year ago

Bump, still not fixed in 1.25.4.

doseonfairsutdios commented 1 year ago

Bump, still not fixed in 1.25.5.

alakoring commented 1 year ago

I think I am seeing the same issue — I want to use VS Code with Unity. If I launch VS Code 1.77.1 from Unity, I get the message. If I launch it from Terminal, it works. (C# extension is 1.25.4.)

stanroy commented 1 year ago

Same for me, if I open VSCode through the dock and open Unity project from there it works fine, opening it by double clicking in Unity results in the mono install popup.

epurban commented 1 year ago

Same

doseonfairsutdios commented 1 year ago

The latest version( v2.0.248 ) c# extension does not show a pop-up, but when you open multiple projects with vscode through Unity, IntelliSense does not work properly in the second vscode.

As @stanroy said, it works fine when you open it in vscode, not in Unity with The latest version( v2.0.248 ) c# extension.

Same for me, if I open VSCode through the dock and open Unity project from there it works fine, opening it by double clicking in Unity results in the mono install popup.

It is quite inconvenient to open a Unity project with vscode instead of opening a project in Unity.