Web.Config 中的程序集节点的用途是什么? [英] What is the purpose of the Assemblies node in Web.Config?

查看:14
本文介绍了Web.Config 中的程序集节点的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio 2005 中创建新的 ASP.NET AJAX Web 应用程序时,默认的 web.config 包含以下部分(在编译节点内):

When creating a new ASP.NET AJAX Web Application in Visual Studio 2005, the default web.config contains the following section (inside the compilation node):

<assemblies>
    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>

assemblies 节点是否存在似乎不会影响 AJAX 功能.无论 Web.Config 中是否包含对 System.Web.Extensions 的引用,更新面板等都能正常工作.

Whether or not the assemblies node exists doesn't seem to affect the AJAX functionality. Update panels, etc work fine regardless of whether or not the reference to System.Web.Extensions is included in Web.Config.

此部分的目的是什么,是否可以安全删除?

What's the purpose of this section, and can it be safely removed?

推荐答案

它可能会也可能不会被安全删除.装配节点用于基于配置的参考添加.它被 ASP.NET 网站使用,这些网站将未编译的 .cs 代码文件部署到他们的网站,而不是(像明智的人那样)编译的程序集.

It may or may not be safely removed. The Assemblies node is for configuration-based reference addition. It's used by ASP.NET websites that deploy uncompiled .cs code files to their website, rather than (as sensible people do) compiled assemblies.

如果您将代码隐藏文件而不是程序集部署到您的网站,则将其保留在其中.如果您正在部署程序集,请将其删除.

If you are deploying code-behind files to your website rather than assemblies, then keep it in. If you are deploying assemblies, remove it.

这篇关于Web.Config 中的程序集节点的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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