C
C#12mo ago
CrosRoad95

source generator razor components

i'm trying to source generate razor component did a following thing ( see image ), but component is not rendering, but if i do new foobar.SampleSourceGeneratedComponent() in any c# file it works - no compilation or runtime errors, what am i doing wrong?
No description
2 Replies
CrosRoad95
CrosRoad95OP12mo ago
but if i copy the same code to other .cs file it working
No description
333fred
333fred12mo ago
You can't source generate razor components Razor uses a source generator itself, and generators cannot see each other's output How are you planning to decide what to generate? You'll probably be better off just writing a pre-build msbuild task
Want results from more Discord servers?
Add your server