Can't reference Assemblies in GAC?

N

Nick

I've just created a simple class library, gave it a strong name using
sn.exe, then copied it to c:\winnt\assembly directory. I then created an
ASP client that reference that assembly. The client works only works if I
have the assembly under the ASP client's \bin directory, even though it's
also in GAC. Does anyone know what the problem is?

I got the following error:

File or assembly name <xxxx>, or one of its dependencies, was not found.

The assembly load trace does not seem to include the directory
"c:\winnt\assembly". Does it not always look for the assembly in GAC?

Thanks in advance.
Nick
 
G

Guru Prasad

Not sure if you got a response elsewhere. Anyways, an attempt will be made
to look in the GAC, only if you reference the assembly by the full name -
like so "MyCo.MyAssembly, Version=1.0.1175.28478,
Culture=neutral,PublicKeyToken=5378d68701e60agd"
If you have partial references and don't (cannot) want to change, you can
use qualifyAssembly element in Web.Config to redirect partial-name assembly
requests to full-name requests which then get redirected to GAC.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top