config中的assembly节点的目的是什么?

时间:2022-09-19 20:23:11

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):

当创建一个新的ASP时。NET AJAX Web应用程序在Visual Studio 2005中,默认的Web。配置包含以下部分(在编译节点内部):

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

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.

是否存在程序集节点似乎不会影响AJAX功能。无论对System.Web的引用与否,更新面板等都可以正常工作。在Web.Config中包含了扩展。

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

这部分的目的是什么?它能被安全地移除吗?

2 个解决方案

#1


28  

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.

它可能被安全地移除,也可能不被安全地移除。程序集节点用于基于配置的引用添加。这是用ASP。将未编译的.cs代码文件部署到其网站上的网站,而不是(明智的人所做的)编译程序集。

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

如果您正在将代码隐藏文件部署到您的站点而不是程序集,那么请将其保存在其中。如果您正在部署程序集,请删除它。

#2


11  

Rick Strahl's Web log has short but concisely explaining article on the subject.

瑞克·斯特拉尔(Rick Strahl)的网络日志中有一篇简短但简明扼要的解释了这一问题。

#1


28  

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.

它可能被安全地移除,也可能不被安全地移除。程序集节点用于基于配置的引用添加。这是用ASP。将未编译的.cs代码文件部署到其网站上的网站,而不是(明智的人所做的)编译程序集。

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

如果您正在将代码隐藏文件部署到您的站点而不是程序集,那么请将其保存在其中。如果您正在部署程序集,请删除它。

#2


11  

Rick Strahl's Web log has short but concisely explaining article on the subject.

瑞克·斯特拉尔(Rick Strahl)的网络日志中有一篇简短但简明扼要的解释了这一问题。