Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
374 views
in Technique[技术] by (71.8m points)

asp.net - What is the purpose of the Assemblies node in 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>

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...