多个编译器定义在web.config中的系统。codeDOM的影响 [英] The impact of multiple compiler definitions in system.codedom in web.config

查看:102
本文介绍了多个编译器定义在web.config中的系统。codeDOM的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所有的ASP.NET Web项目正在VB.NET开发研制的。 (因此是卫星DLL项目,这可能是不太相关。

All my ASP.NET web projects are being developed exclusively in VB.NET. (And so are the satellite DLL projects, which is probably less relevant.

当我看到默认的web.config文件,在<系统codeDOM> 标记中,我总能找到编译器定义present C#和VB.NET,如下图所示。

When I look at the default web.config file, under the <system.codedom> tag, I always find compiler definitions present for both C# and VB.NET, as illustrated below.

<compilers>
    <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="WarnAsError" value="false"/>
    </compiler>
    <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/optionstrict+">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="OptionInfer" value="true"/>
        <providerOption name="WarnAsError" value="false"/>
    </compiler>
</compilers>

会不会有性能提升,如果我删除的定义从这个名单C#编译器?或者是一个懒惰的装载系统,其中一个不相干的编译器根本不会被加载。也许什么缺点我可能不会是在想什么?

Will there be a performance gain if I remove the definition for the C# compiler from this list? Or is it a lazy loading system where an irrelevant compiler will simply never be loaded. Or perhaps any drawbacks I might not be thinking of?

我在我调整申请现场部署的过程。

I'm in the process of tweaking my applications for live deployment.

推荐答案

这是懒加载。编译器选项指定编译器是基于文件的扩展名用于动态网页编译。如果该文件不具有扩展名,编译器永远不会启动。

It's lazy loaded. The compiler option specifies which compiler is used for dynamic page compilation based on the file extension. If the file doesn't have that extension, the compiler is never launched.

,你可以放心地将其删除。但是,如果你认为你的可能的在未来使用的混合语言的发展,这是最好的离开那里,因为它没有任何伤害。

If you're not using both languages, you can safely remove it. However, if you think you might used mixed-language development in the future, it's best to leave it there, as it does no harm.

这篇关于多个编译器定义在web.config中的系统。codeDOM的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆