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