Open LAC-Tech opened 3 months ago
No, source generators are automatically invoked by the compiler. As long as you're in a supporting environment, e.g. Visual Studio, VS Code with C# Dev Kit, etc., and you reference the RazorSlices
package and have some .cshtml files in your project, you should see the generated types become available in your IntelliSense/statement-completion, e.g. the below image is in Visual Studio:
And in VS Code with C# Dev Kit:
Note that it can take a few seconds for it all to initialize before the generated types show up.
Hello, I have a question from the docs:
Each .cshtml file will have a proxy type generated for it by the Razor Slices source generator that you can use as the generic argument to the various APIs in Razor Slices for rendering slices.
I assume I have to invoke this source generator somehow?