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

Fails to show instructions of code generated by Source Generators #6

Open
vvdev opened this issue Mar 19, 2023 · 3 comments
Open

Fails to show instructions of code generated by Source Generators #6

vvdev opened this issue Mar 19, 2023 · 3 comments

Comments

@vvdev
Copy link

vvdev commented Mar 19, 2023

VS2022, Version 17.6.0 Preview 1.0

CodeLens do not show instructions details, hint shows the following exception:
image

@bert2
Copy link
Owner

bert2 commented Mar 19, 2023

That's a weird one. The extension tries to determine the csproj/assembly where the current file resides in, but can't find it.

In my understanding this would mean you are working on a .net framework project and the generated file is not visible in the solution explorer. Are those assumptions correct?

Could you provide more details please? I need to know the folder structure and the solution structure of the folder/project where the affected file belongs to.

@bert2 bert2 closed this as completed Mar 19, 2023
@bert2 bert2 reopened this Mar 20, 2023
@bert2
Copy link
Owner

bert2 commented Mar 20, 2023

@vvdev Just noticed I accidentally closed the issue yesterday. Reopened.

@vvdev
Copy link
Author

vvdev commented Mar 20, 2023

Hello, @bert2

Project is .NET6/.NET7

Yes, code file is not visible in Solution Explorer, it is not even persisted to disk, it is behavior of C# Source Generator.
https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview
You can see/inspect such code only by navigating there using Go To Definition from callee code.

Please let me know if you need more context.

Thanks for your product and attention to issues :)

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants