microsoft / microsoft/vscode-dotnettools

Solution explorer doesn't show source generated files

Open
#362 4 comments 21 reactions 2 assignees View on GitHub

@lifengl is already working on this.

Since Oct 30, 2024.

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

Description

Describe the feature you'd like

With the following code:

using System.Text.RegularExpressions;

namespace SG;

public partial class Class1
{
    Regex r = MyRegex();

    bool Test(string s) => r.Match(s).Success;

    [GeneratedRegex("abc.*")]
    private static partial Regex MyRegex();
}

I can see the generated source in VS

image

However it is unavailable in VS Code

image

Alternatives considered

Use Visual Studio is one alternative.

Environment Information

Windows 11
VS Code 1.81.0
C# Dev Kit v0.4.2

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.