Closed parched closed 6 months ago
If I open https://github.com/dotnet/roslyn-sdk/blob/main/samples/CSharp/SourceGenerators/SourceGenerators.sln from a fresh clone in VS I get a lot of errors when I open the demo files.
When I build the solution the errors go away.
Is this the intended behavior or is it a bug in VS or in these samples?
The source generator project needs to be built once and then restart Visual Studio for it to take effect. This is a known limitation of source generators that are defined in the same solution where they are used.
If I open https://github.com/dotnet/roslyn-sdk/blob/main/samples/CSharp/SourceGenerators/SourceGenerators.sln from a fresh clone in VS I get a lot of errors when I open the demo files.
When I build the solution the errors go away.
Is this the intended behavior or is it a bug in VS or in these samples?