Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top