Relative Content

Tag Archive for c#roslynroslyn-code-analysissourcegenerators

Intellisense not seeing source generated from a local C# source generator

I have a solution which contains 4 projects. One of them is a Roslyn source generator, one is a class library which uses the source generator, one is a testing project which also uses the source generator, and the other is for unit tests which doesn’t use it. The project builds and runs perfectly, but I get error squiggles in my IDE for the generated code. I’ve tried both Visual Studio and VS Code (even on a completely different computer), however on VS Code there is a small time window while the project is opening back up where I can hover over the generated method and see its signature. The source generator targets .NET Standard 2.0. I’ve restarted my editors, cleaned and rebuilt everything, cleaned and only rebuilt the source generator before opening the IDE, cleared all the caches, and restarted my computer.