Linking incremental generator to the consumer project
I have a problem where content generated by an IncrementalGenerator isn't available in the consumer project, no matter what I'm trying to do in both projects' files.
Generator project: netstandard2.0 class library.
Consumer project: net9.0 console app.
Both projects are in the same solution.
Will be able to provide necessary code later.
6 Replies
Both project files and the build output of your test project would be useful.
I think the fortune tellers are on holiday at the moment, so in order to help you we would like to see the projects and build output ☺️
Yeah, sorry, didn't have access to the project at the time.
But already solved the problem by an accident lmao
The consumer project was missing
ReferenceOutputAssembly="false"
in consumer .csproj
And in the end files look like this:
Generator:
Consumer:
And thanks for quick responseIf you want to improve your debugging experience, add the 'IsRoslynComponent' property to your generator and set it to true.
ok, thx
actually, is there a list of Roslyn-related project properties?
I'm not sure there is.