Click here to Skip to main content
15,742,655 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

i have one C++ dll, and a c# dll,

i am not able to register them,

for c# dll, i am getting the error as

gacutil /i mycsharp.dll

"Failure adding assembly to the cache: Attempt to install an assembly without a s
trong name"

and for C++ i am getting the error as,

regsvr32 mycpp.dll

"mycpp.dll was loaded, but the DllRegisterServer entry point was not found, This file cannot be registered." .
Sergey Alexandrovich Kryukov 21-Mar-12 1:48am    
Please stop re-posting!
Use the page where you first asked this or similar question. Use "Improve question" if you want.

As the error suggests, you need a strong name.
Check out documentation on msdn for creating a strong name.

Doing a search on the internet will help you as well.
Share this answer
Sergey Alexandrovich Kryukov 21-Mar-12 3:22am    
It's called signing. The problem is that we don't know what OP is developing; I suspect OP does not know, too... :-)
I tried to put together all what's involved, please see...
Monjurul Habib 21-Mar-12 3:40am    
Abhinav S 21-Mar-12 6:06am    
Thank you Monjurul.
First, about GACUtil:

Sign the assembly. Sign it. Even if you don't need it in GAC. If you want to deploy it with application, sign it.

(Do you understand that you don't have to put a library in GAC, only if this is a library to be used by your user? Or if it is to be used by more then one product? It is not needed to deploy just one application in several assemblies.)

Sign everything you deploy in binary form.

Please see:[^],[^].

See this CodeProject article:
Strong Names Explained[^].

Learn the basics of it. This is very important staff, one of fundamentals. Signing assembly takes seconds, but you should understand why are you doing it.

Now, about regsvr32:

This is a tool for registration of COM DLL, please see:[^].

Are you sure you implement such thing?


You need to understand what are you developing, what are you trying to register and why. Do you develop COM? .NET Assembly? Both? Why? Do you really need registration of GAC? If this is just a single software product with one more applications, you many not even need any installations. It depends on your purpose. Start from it. Learn the basics of the technologies you use and clearly indicate it when and if you want to ask another question.

So far, my impression of your method is something I call "kicking a TV set until it starts showing a picture". :-)

Share this answer
Monjurul Habib 21-Mar-12 3:40am    
Sergey Alexandrovich Kryukov 21-Mar-12 3:41am    
Thank you, Monjurul.
Abhinav S 21-Mar-12 6:08am    
That is a lot of detail. My 5.
Sergey Alexandrovich Kryukov 21-Mar-12 11:49am    
Thank you, Abhinav.
Incase of C++
You can not register a normal dll. You register only COM dll. Your dll seems to be not a COM dll. So you dont need to register it. You can use it directly. To know how to use a dll from a client application see this link[^]
Share this answer
Sergey Alexandrovich Kryukov 21-Mar-12 3:19am    
True. OP does not probably know what is being developed.
I tried to explain all possible aspects, please see.
I think only COM dll can be registered to system.
I guess you may created a dll as general dynamic dll.
If you want to register your dll to system, you should create dll Project as ATL ComAppWizard.
Share this answer
Sergey Alexandrovich Kryukov 21-Mar-12 2:21am    
The question is about CAGUtil. Do you even understand what is it all about? Why answering if you apparently have no idea. Sorry, I just had to vote 1. I would advise to remove this answer, to avoid further down-votes.
[EDIT] I see, OP just trying to do different things... I updated my answer, fixed the voted and commented on it, please see.
[no name] 21-Mar-12 2:40am    
Hi, SA.
My answer is for registering C++ dll.
I just only have a will to help someone's developing.
I'm not afraid of 1 vote.
Are you sure you get clear of question?
Sergey Alexandrovich Kryukov 21-Mar-12 3:13am    
I see. Up-voted to 4. It was my fault to see the second part of the question, but it would be good if you also mentioned what do you mean in your answer. Sorry for the confusion.

The problem is of course OP who probably does not understand the meaning of registration. I seriously suspect that maybe no registration is needed at all. It all depends.

I'll add a note to my own answer to avoid further confusions.

Thank you.

Please make sure that you are trying to register a COM dll.Only COM dll's are need to register.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900