-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Version Used:
Microsoft Visual Studio Professional
Version 17.14.16
Version 17.14.16 Preview 1.0
Version: 18.0.0 Insiders [11104.47]
Steps to Reproduce:
- Open the attached solution SourceGeneratorTest.zip
- Open
Program.cs
in the editor - Rebuild the solution
To reproduce again delete bin
and obj
folder from the Generator
project folder before opening the solution.
Expected Behavior:
After rebuilding the project without errors, code analysis and the error list don't show any errors
Actual Behavior:
Roslyn shows the generator as not generating any files in solution explorer.
Roslyn shows errors caused by missing types provided by the source generator.
devenv_WgCisHf2ZK.mp4
Notes:
- after a second build, or upon saving the file (even though there are no actual changes) Roslyn recognizes files from the source generator
- it also recognizes it if you first rebuild the solution and then navigate to
Program.cs
I believe that it is similar to #80714 - Roslyn doesn't queue an update after reloading an assembly with the source generator, causing it to wait indefinitely for some next event (such as new build request) that would trigger it.