Add a DLL into GAC, but fail to find it from reference windows of Visual Studio.

Z

zlf

Hello,
I have a C# library project. I've built a strong named DLL, then add it into
GAC via gacutil /i XXX.dll.
After adding it, I can see it in gacutil /l.
But I fail to find it in reference window in Visual Studio. What is problem?
Thanks

zlf
 
N

Norman Yuan

Adding .NET DLL into GAC does not make it automatically appear in the
reference dialog in VS.

There is two way to solve it:

1. Directly set reference to the DLL file. This is recommended approach.
Although iin your new project the reference is set to the DLL file, when
your new app runs, .NET always search GAC first and if fond, load it from
there.

2. You have to modify Windows Registry. I could not remember the details
('cause I only use the first approach aforementioned). Search the net would
lead you to the detail of how to do it (again, I wouldn't bother doing it,
if I use DLL developed by myself).
 

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

Top