Вопрос

I'm trying to use RazorEngine to render templates and my templates are in VB.NET. The documentation is thin (or wrong) about how to specify what language the template parser should use, and I can't figure out how to configure it to use VB.

Can anyone point me in the right direction on this?

Это было полезно?

Решение

Have you tried specifying VB as the language in the razorEngine -> templateServices config section?

<razorEngine>
    <templateServices>
        <add name="myCustomTemplateService" language="VB" />
    </templateServices>
<razorEngine>

From the original CodePlex site - Using Configuration

See the section called Accessing configured template services

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top