microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.96k stars 29.18k forks source link

current document is outside of any project opened #232793

Open codebrane opened 4 hours ago

codebrane commented 4 hours ago

Type: Bug

Open workspace with two projects. Open any file in 2nd project and the error appears:

"current document is outside of any project opened"

Deleted sln and workspace files, recreated structure and error persists. IDE can no longer be used due to lack of IDE functionality in 2nd project.

intellisense and test debug/run don't work in second project because of this error.

VS Code version: Code 1.95.1 (65edc4939843c90c34d61f4ce11704f09d3e5cb6, 2024-10-31T05:14:54.222Z) OS version: Darwin x64 22.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz (4 x 3800)| |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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|2, 2, 3| |Memory (System)|8.00GB (0.04GB free)| |Process Argv|. --crash-reporter-id 634156d6-311a-462f-be77-c0a789a1101c| |Screen Reader|no| |VM|0%|
Extensions (52) Extension|Author (truncated)|Version ---|---|--- cucumberautocomplete|ale|3.0.5 specflow-tools|ami|1.1.3 azurite|Azu|3.33.0 doxdocgen|csc|1.4.0 cucumber-official|Cuc|1.10.0 vscode-eslint|dba|3.0.10 durablefunctionsmonitor|Dur|6.5.1 vscode-html-css|ecm|2.0.10 prettier-vscode|esb|11.0.0 php-intellisense|fel|2.3.14 dotnet-test-explorer|for|0.7.8 better-cpp-syntax|jef|1.27.1 rainbow-csv|mec|3.12.0 azure-dev|ms-|0.8.4 vscode-azureappservice|ms-|0.25.4 vscode-azurecontainerapps|ms-|0.7.1 vscode-azurefunctions|ms-|1.15.4 vscode-azureresourcegroups|ms-|0.9.8 vscode-azurestaticwebapps|ms-|0.12.2 vscode-azurestorage|ms-|0.16.1 vscode-azurevirtualmachines|ms-|0.6.6 vscode-bicep|ms-|0.30.23 vscode-cosmosdb|ms-|0.23.0 vscode-docker|ms-|1.29.3 vscode-logicapps|ms-|1.2.9 csdevkit|ms-|1.11.14 csharp|ms-|2.54.20 dotnet-interactive-vscode|ms-|1.0.5530010 vscode-dotnet-runtime|ms-|2.2.2 vscodeintellicode-csharp|ms-|2.1.11 semantic-kernel|ms-|0.12.0 jupyter|ms-|2024.10.0 jupyter-keymap|ms-|1.1.2 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 remote-containers|ms-|0.388.0 remote-ssh|ms-|0.115.0 remote-ssh-edit|ms-|0.87.0 remote-wsl|ms-|0.88.5 vscode-remote-extensionpack|ms-|0.26.0 azure-account|ms-|0.12.0 azurecli|ms-|0.6.0 cpptools|ms-|1.22.10 cpptools-extension-pack|ms-|1.3.0 powershell|ms-|2024.2.2 remote-explorer|ms-|0.4.3 remote-server|ms-|1.5.2 vscode-node-azure-pack|ms-|1.2.0 vscode-serial-monitor|ms-|0.13.1 specflow-steps-definition-generator|Raj|1.0.5 LiveServer|rit|5.7.9 vscode-stylelint|sty|1.4.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 01bff139:31013167 dvdeprecation:31068756 dwnewjupyter:31046869 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31132770 nativeloc2:31134642 wkspc-ranged-t:31151552 cf971741:31144450 iacca1:31171482 notype1cf:31157160 5fd0e150:31155592 dwcopilot:31170013 ```
codebrane commented 4 hours ago

.NET test explorer says "3 tests". Right click on any of them and "Go to test" and it fails with the error "Could not find test (no symbols found)"

Can run/debug the tests from the .NET explorer but the IDE itself doesn't work as there isn't any intellisense for any file in the 2nd project due to the main error.