microsoft / microsoft/vscode-dotnettools

C# Project Details means there is no longer a way to view linked files together with regular files

Open
#3,203 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-solution
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

The latest C# Dev Kit update starts with this statement (highlighting mine):

We’ve consolidated C# Dev Kit’s Solution Explorer view with VS Code’s Explorer to ensure one primary way to navigate and understand your files and folders. Moving forward, VS Code’s Explorer should be used to see and work with files and folders on disk, and the newly named “C# Project Details” should be used to view virtual project details like Dependencies, Packages, linked files, and more.

However, this separates the regular files in the opened folder from other files that are linked in via the .csproj. The implication being that linked files are not to be treated the same way as regular files, even though arguably they should be, as the developer chose to link them in.

In other IDEs such as Visual Studio and Rider, the linked files appear together with the regular files (with an icon to identify them as links). In our case, this is the desired behaviour, as the linked files are useful in the context of the files around them.

  • In VS Code, the Explorer section only shows real files (which is understandable).
  • The Solution Explorer used to work in the same way as Visual Studio, and allow a "project-oriented" view of the files/folders that included inline linked files/folders.
  • The new C# Project Details section currently does not show these linked files at all, but from the above statement it would appear that the intention is that linked files would show in some future release.

The result is that something like the following in the .csproj no longer has the intended effect of "inlining" files that are external to the project folder. (Among other things, we use this to show supporting files where they are most relevant)

  <ItemGroup>
    <None Include="$(ExternalFolder)/**/*.*">
      <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
    </None>
  </ItemGroup>

It also means that linked AdditionalFiles may also be hidden away in the C# Project Details section, rather than together with the other files.

  <ItemGroup>
    <AdditionalFiles Include="../ImportantSharedFile.json" />
  </ItemGroup>

I realise that these changes may be "by design", but as the release notes explicitly request feedback on the changes, I thought it worth pointing out that it will not be without impact.

Environment Information:

  • OS:
    macOS
  • Extension Version:
    ms-dotnettools.csdevkit: 3.20.199

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided .csproj ItemGroup examples in VS Code using C# Dev Kit 3.20.199, then compare the Explorer and C# Project Details views. Done means linked files and linked AdditionalFiles are visible alongside the relevant regular project files, with their linked status distinguishable.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, vscode
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.