Compartilhar via


<add> Element for <assemblies>

Adds an assembly reference to use during compilation of a dynamic resource. ASP.NET automatically links this assembly to the resource when compiling each code module.

<configuration>
   <system.web>
      <assemblies>
         <add>

<add assembly="Assembly [,Version=version number] 
               [,Culture=culture] [,PublicKeyToken=token]"/>

Required Attribute

Attribute Description
assembly Specifies a comma-separated assembly combination consisting of version, culture, and public key tokens. ASP.NET searches for the assembly DLL first in the application's private \bin directory and then in the system assembly cache.

Remarks

The value of <add> is an assembly name, not a DLL path. ASP.NET looks up the assembly name to find its physical DLL location. You can optionally specify the wildcard character * (an asterisk) to add every assembly within an application's private assembly cache. For details, see Assembly.Load.

Example

The following example adds an assembly reference to an application.

<configuration>
   <system.web>
      <compilation>
         <assemblies>
            <add assembly="System.Data, Version=1.0.2411.0, 
                           Culture=neutral, 
                           PublicKeyToken=b77a5c561934e089"/>
         </assemblies>
      </compilation>
   </system.web>
</configuration>

Requirements

Contained Within: <system.web>

Web Platform: IIS 5.0, IIS 5.1, IIS 6.0

Configuration File: Machine.config, Web.config

Configuration Section Handler: System.Web.UI.CompilationConfigurationHandler

See Also

<assemblies> Element | ASP.NET Configuration | ASP.NET Settings Schema