Referencing a Class Assembly from GAC using Visual Studio .Net

Hi there,

I am currently building a c# application and have created a seperate class library, which I need to reference from the GAC.

I have given the assembly a strong name and have placed it in the assembly using gacutil and also by draggin the dll into the WINNT/assembly folder.

However when I right click in visual studio.net on reference in my application to add a reference to the assembly I cannot find it in the list.

Can anyone help me? Ive tried rebooting, closing down and re-opening the project.. I also cannot manage to delete the assembly so I can try re-installing it.... Any ideas?

Thanks

fevster
fevsterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ryerrasCommented:
You wouldnt find your custom assemblies (which are placed in the GAC) in the list by default. It requires a Registry Key to appear in the list.
So, You need to browse to the GAC and add it to the project. GAC is in C:\Windows\Assembly folder
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
khareatulCommented:
Hi

You have to follow the steps below

1. Create a strong name for assembly.

2. Install assembly to GAC.

3. Register assembly entry in registry:
 1) Click Start - run, then type regedit to open registry.
 2) Go to HEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\
 3) Right click AssemblyFolders, then select new to create a new key for your assembly(for example:Security)
 4) Select Modify by right clicking Default, then enter the location where your dll resides.

Now, you should be able to see the name of your dll from the reference list when you open a VS project.

I think you have done steps 1 & 2 ,follow the step 3.

Regards
Atul
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.