Open dibarbet opened 1 month ago
Worked for me on both my machines, so I suspect either some flakiness or related to the specific configuration in the project. Given it apparently works in VS I assume its not an issue in the project.
https://github.com/dotnet/vscode-csharp/issues/7223#issuecomment-2161824658
Ive zipped up a sample (created on my M1 mac). There are 2 solutions - ConsoleApp1 and ConsoleApp2. ConsoleApp2 project includes a linked cs file from ConsoleApp1. When I open ConsoleApp2 in Rider the linked file is in the project folder, when I open ConsoleApp2 in VS Code it isnt. linkedtest.zip
@deanchalk:
When I open ConsoleApp2 in Rider the linked file is in the project folder, when I open ConsoleApp2 in VS Code it isnt.
You mean in VS Code the file doesn't show in Solution Explorer where you would expect to see it?
Describe the Issue
Copied from https://github.com/dotnet/vscode-csharp/issues/7223 originally filed by @deanchalk
Type: Bug
Steps to Reproduce
Open an existing csharp project that was created by Visual Studio or Jetbrains Rider - and that incldues code files from a different location (linked files).
For example in the csproj file you may have a code file link like this:
<Compile Include="..\Original\WafStack.cs"><Link>WafStack.cs</Link></Compile>
This means the code file lives elsewhere but there is a link to it.
This works perfectly well in Visual Studio and Rider, but in VS Code the loaded project doesnt locate these files.
C# log
C# LSP Trace Logs
Environment information
VSCode version: 1.90.0 C# Extension: 2.31.19 Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.300 Commit: 326f6e68b2 Workload version: 8.0.300-manifests.c1c70047 MSBuild version: 17.10.4+10fbfbf2e Runtime Environment: OS Name: Mac OS X OS Version: 14.5 OS Platform: Darwin RID: osx-arm64 Base Path: /usr/local/share/dotnet/sdk/8.0.300/ .NET workloads installed: There are no installed workloads to display. Host: Version: 8.0.5 Architecture: arm64 Commit: 087e15321b .NET SDKs installed: 6.0.422 [/usr/local/share/dotnet/sdk] 7.0.316 [/usr/local/share/dotnet/sdk] 8.0.300 [/usr/local/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.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/downloadVisual Studio Code Extensions
|Extension|Author|Version|Folder Name| |---|---|---|---| |amazon-q-vscode|amazonwebservices|1.8.0|amazonwebservices.amazon-q-vscode-1.8.0| |aws-toolkit-vscode|amazonwebservices|3.9.0|amazonwebservices.aws-toolkit-vscode-3.9.0| |copilot|GitHub|1.200.0|github.copilot-1.200.0| |copilot-chat|GitHub|0.16.0|github.copilot-chat-0.16.0| |crates|serayuzgur|0.6.6|serayuzgur.crates-0.6.6| |csdevkit|ms-dotnettools|1.6.8|ms-dotnettools.csdevkit-1.6.8-darwin-arm64| |csharp|ms-dotnettools|2.31.19|ms-dotnettools.csharp-2.31.19-darwin-arm64| |even-better-toml|tamasfe|0.19.2|tamasfe.even-better-toml-0.19.2| |graphql|mquandalle|0.1.2|mquandalle.graphql-0.1.2| |localstack|LocalStack|0.1.1|localstack.localstack-0.1.1| |remote-containers|ms-vscode-remote|0.369.0|ms-vscode-remote.remote-containers-0.369.0| |rust-analyzer|rust-lang|0.3.1995|rust-lang.rust-analyzer-0.3.1995-darwin-arm64| |rust-syntax|dustypomerleau|0.6.1|dustypomerleau.rust-syntax-0.6.1| |vscode-docker|ms-azuretools|1.29.1|ms-azuretools.vscode-docker-1.29.1| |vscode-dotnet-runtime|ms-dotnettools|2.0.6|ms-dotnettools.vscode-dotnet-runtime-2.0.6| |vscode-kubernetes-tools|ms-kubernetes-tools|1.3.16|ms-kubernetes-tools.vscode-kubernetes-tools-1.3.16| |vscode-lldb|vadimcn|1.10.0|vadimcn.vscode-lldb-1.10.0| |vscode-yaml|redhat|1.15.0|redhat.vscode-yaml-1.15.0|;Extension version: 2.31.19 VS Code version: Code 1.90.0 (Universal) (89de5a8d4d6205e5b11647eb6a74844ca23d2573, 2024-06-04T19:34:44.157Z) OS version: Darwin arm64 23.5.0 Modes:
System Info
|Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 2400)| |GPU Status|2d_canvas: enabledcanvas_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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|2, 3, 3| |Memory (System)|32.00GB (0.78GB free)| |Process Argv|--crash-reporter-id 1afe3170-f0fa-4ce4-a2b2-69ab964bb8ca| |Screen Reader|no| |VM|0%|
A/B Experiments
``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 vscaat:30438848 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelt:31048053 dsvsc021:30996838 724cj586:31013169 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupyter:31046869 2f103344:31071589 26j00206:31048877 ```Steps To Reproduce
No response
Expected Behavior
No response
Environment Information
No response