What generator to use for partials?

Feb 7, 2015 at 6:33 PM
Edited Feb 7, 2015 at 11:50 PM
For regular views, you need to use @* Generator: MvcView *@.

Do I need to declare a generator for a partial view? If so, which one?

I ask because I sometimes get an exception that The "RenderBody" method has not been called for layout page "~/Views/blah/blah.cshtml". But I shouldn't get such an exception for a partial view. I'm wondering whether it is because I don't declare a generator for the partial.
Feb 7, 2015 at 9:32 PM
Edited Feb 7, 2015 at 9:32 PM
If you remove the Generator directive, RazorGenerator should attempt to detect the view type for you using heuristics. If that doesn't work for you, use @* Generator: MvcView *@ (https://razorgenerator.codeplex.com/wikipage?title=Precompiled%20MVC%20Views&referringTitle=Documentation)
Feb 7, 2015 at 11:53 PM
Nope that didn't help. I guess it's not a RazorGenerator problem then.

But I'm glad to know which generator to use for partials(MvcView), because the info on that page refers to (regular) views, not partial views.