无法注册dll [英] unable to register a dll

查看:93
本文介绍了无法注册dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个C ++ dll和一个C#dll,

我无法注册,


对于C#dll,我得到的错误为

gacutil/i mycsharp.dll

无法将程序集添加到缓存中:尝试安装不带s的程序集
皮带名称"

对于C ++,我得到的错误是,

regsvr32 mycpp.dll

"mycpp.dll已加载,但找不到DllRegisterServer入口点,无法注册此文件." .

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." .

推荐答案

错误提示,您需要一个强名称.
请查看msdn上的文档以创建强名称.

在互联网上搜索也会对您有帮助.
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.


首先,关于GACUtil:

在程序集上签名.签字.即使您在GAC中不需要它.如果要与应用程序一起部署,请对其进行签名.

(您知道您不必在GAC中放置一个库,只要该库是供用户使用的库即可?还是要供一个以上的产品使用?是否需要部署?几个程序集中只有一个应用程序.)

以二进制形式对您部署的所有内容进行签名.

请参阅:
http://en.wikipedia.org/wiki/Strong_name [ http://msdn.microsoft.com/en-us/library/wd40t7ad.aspx [ ^ ].

请参阅此CodeProject文章:
强名称解释 [ http://msdn.microsoft.com/en-us/library/ms859484.aspx [ ^ ].

确定要实现这种方法吗?

结论

您需要了解您在开发什么,您要注册什么以及为什么注册.你开发COM吗? .NET程序集?两个都?为什么?您真的需要注册GAC吗?如果这只是一个具有多个应用程序的软件产品,那么您甚至根本不需要任何安装.这取决于您的目的.从此开始.了解您使用的技术的基础知识,并在何时以及是否要问其他问题时清楚地指出.

到目前为止,我对您的方法的印象是我所说的踢电视机直到开始显示图片". :-)

—SA
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:
http://en.wikipedia.org/wiki/Strong_name[^],
http://msdn.microsoft.com/en-us/library/wd40t7ad.aspx[^].

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:
http://msdn.microsoft.com/en-us/library/ms859484.aspx[^].

Are you sure you implement such thing?

Conclusion

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". :-)

—SA


如果是C ++,
您无法注册普通的dll.您只注册COM dll.您的dll似乎不是COM dll.因此,您无需注册.您可以直接使用它.若要知道如何从客户端应用程序中使用dll,请参阅此链接 http://msdn.microsoft.com/en-us/library/ms235636(v=vs.80).aspx [
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 http://msdn.microsoft.com/en-us/library/ms235636(v=vs.80).aspx[^]


这篇关于无法注册dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆