C
C#3mo ago
naka

Incremental generator not outputting generated members

I have an incremental generator that theoretically generates all members properly, given they are shown inside of the IDE, but they're not actually being outputted to my project's .dll or obj/. On the generator's project it does generate an obj/generated/ directory, but it's empty nonetheless.
No description
10 Replies
naka
nakaOP3mo ago
From Aurora.dll
No description
naka
nakaOP3mo ago
From Aurora.Generators.csproj
No description
jooty
jooty3mo ago
On the generator's project it does generate an obj/generated/ directory
it sounds like you have the EmitCompilerGeneratedFiles property set to true. though, the property should be enabled on your "consumer" project, i.e Aurora. granted, I have no further insight into solving this. I just happen to be suffering from the same problem
naka
nakaOP3mo ago
Seems like this ""worked"", the generated/ directory now exists but its still empty despite the IDE revealing the generated members This sucks so much https://discord.com/channels/143867839282020352/1185530543861927967
jooty
jooty3mo ago
well, we're a little late on this but I was finally able to get generation to occur. it seems like visual studio community's debugger has proceeded with generation into both my output directory and the assembly itself. no matter how much I finagle vscode or Rider, it seems only VS community will get it to generate
jooty
jooty3mo ago
I even used the same launch settings that Rider recommends to debug a source generator
No description
naka
nakaOP3mo ago
Could this possibly be a Rider issue then? Im also using Rider
jooty
jooty3mo ago
no idea. I typically use vscode and the dotnet cli and I'm still struggling with the issue. right now my current hypothesis is that the consumer project (the project referencing the source generator) must be a console application or something that can actually execute but I am still currently investigating
naka
nakaOP3mo ago
Yeah, my project is an executable so, no clue why it wouldnt work
jooty
jooty3mo ago
hmm. im not sure then. but definitely a step in the right direction. before I wasnt getting any sort of errors. now I have 2258. guess that's a good thing right now
Want results from more Discord servers?
Add your server