开发者

How to use VB `option` statements (explicit/infer/strict) in T4 templates?

When creating a开发者_开发技巧 T4 template in VB.NET, how do you specify Option Explicit, Option Strict, and Option Infer settings? There's some sort of <#@ #> tag for doing this, but I can't find it.


If you're using Visual Studio 2010, the <#@ template #> directive has a new 'compilerOptions' parameter. This allows options to be passed directly to the codedom compiler. For example, for the VB compiler, /optionstrict+- /optioninfer+- /optionexplicit+-.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜