Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution explorer doesn't show source generated files #362

Open
virzak opened this issue Aug 8, 2023 · 2 comments
Open

Solution explorer doesn't show source generated files #362

virzak opened this issue Aug 8, 2023 · 2 comments
Assignees
Labels
area-roslyn enhancement New feature or request triaged The issue has been triaged
Milestone

Comments

@virzak
Copy link

virzak commented Aug 8, 2023

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

@virzak virzak added the enhancement New feature or request label Aug 8, 2023
@microsoft-issue-labeler microsoft-issue-labeler bot added the area-test Test discovery, execution, debugging label Aug 8, 2023
@AbhitejJohn AbhitejJohn added area-roslyn and removed area-test Test discovery, execution, debugging labels Aug 11, 2023
@jasonmalinowski jasonmalinowski self-assigned this Aug 15, 2023
@arunchndr arunchndr added the triaged The issue has been triaged label Aug 17, 2023
@jasonmalinowski jasonmalinowski changed the title Source generator output files Solution explorer doesn't show source generated files Aug 30, 2023
@dibarbet dibarbet added this to the Dec2023 milestone Nov 28, 2023
@jasonmalinowski jasonmalinowski modified the milestones: Dec2023, Backlog Jan 26, 2024
@SzymonHalucha
Copy link

This is a very useful functionality, and it is constantly being delayed :(

@dibarbet
Copy link
Member

In VS this is provided through MEF APIs like IAttachedCollectionSource and IAttachedCollectionSourceProvider. These APIs do not exist and will not work in VSCode since we are in separate processes.

@lifengl is there a way for the C# extension to contribute to the solution explorer? Otherwise we may need a new brokered service for this kind of functionality.

See https://github.com/dotnet/roslyn/blob/9e862f15fc4d57a479ac45724748a41c87a7d0b6/src/VisualStudio/Core/Impl/SolutionExplorer/DiagnosticItem/CpsDiagnosticItemSourceProvider.cs#L27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-roslyn enhancement New feature or request triaged The issue has been triaged
Projects
None yet
Development

No branches or pull requests

7 participants