Question on adding an assembly to GAC



Hello All,

I am trying to add an assembly to GAC but having difficult time figuring out
the concept of GAC. This is what I am trying to do....

1. Installed NUnit framework whose DLL ("nunit.framework.dll") I need to add
to the GAC so that I can use it from multiple applications.

2. Used the command "sn" to make sure that the assembly is strongly named.

3. Used the command "GACUtil" to register the assembly in GAC.

Now when I expand the "References" node for my web application I do not see
the newly GAC'ed assembly. Does any one know why?

I thought that once I GAC'ed an assembly I do not have to add the reference
to it again. Am I wrong? Do I need to again add the reference to that dll
from the "Reference" node?

Thanks for your help!!




Strong naming an assembly must be done at compile - time by including the
correct directives in the assemblyInfo.cs file, including the path to the
strong name key file.

Just creating a key file doesn't make your assembly strong-named.
(The NUnit DLL may already have a strong name, you'll have to check).

Once you get this installed in the GAC, you still won't be able to find it
for "any project" unless it's added to the macnine.config file so it appears
in your References TAB list.

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