Reference GAC assemblies from web.config

 

How to reference assemblies in the Global Assembly Cache from your web.config (no dll's are needed in bin):

<system.web>
   <compilation>
       <assemblies>
          <add assembly="MNissen.DataControls, Version=1.1.0.0, Culture=neutral, PublicKeyToken=e21df62f5c740a13"  />
          <add assembly="Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e21df62f5c740a13"  />
          <add assembly="Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e21df62f5c740a13"  />
          <add assembly="Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e21df62f5c740a13"  />
          <add assembly="Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e21df62f5c740a13"  />
    </assemblies>
    </compilation>
</system.web>

Filed under:

Comments

# TrackBack said:
Wednesday, June 09, 2004 3:44 AM
# TrackBack said:
Wednesday, June 09, 2004 6:49 AM
# Peter carwell said:

How can I tell what the version number, culture and publicKeyToken of any given Assembly is?

Wednesday, July 28, 2004 6:46 AM
# Mads said:

Check out the C:\WINDOWS\assembly folder...

Wednesday, July 28, 2004 6:50 AM
# Vikram said:

But how can I be sure if the same version will be there in the production environment. Also What if some other version is there in the production environment.

Monday, July 30, 2007 2:32 AM
# Alan said:

How can i send parameters to an assembly located in the GAC thru web.config?

Tuesday, April 08, 2008 11:15 AM
# Chadwick Tuto said:

Where in the hell is web.config?

Thursday, June 25, 2009 8:46 PM