简体   繁体   English

在GAC中注册自定义C#程序集

[英]Register custom C# assemblies in the GAC

I wrote some codes with C# and make dll files. 我用C#编写了一些代码,并制作了dll文件。 When i put my Application on another system my application needs dll files beside the .exe file. 当我将我的应用程序放在另一个系统上时,我的应用程序需要.exe文件旁边的dll文件。 I know that some dll files copy to GAC and the exe file doesn't need the files anymore. 我知道一些dll文件复制到GAC,而exe文件不再需要这些文件。 I also know if dll is type of ActiveX or COM we can use regsvr32 or regAsm. 我也知道dll是ActiveX还是COM类型,我们可以使用regsvr32或regAsm。 But i don't know how i can register my own dll files in windows. 但是我不知道如何在Windows中注册自己的dll文件。

You need to open the command prompt which comes with VS. 您需要打开VS随附的命令提示符。

You need to use the gacutil tool 您需要使用gacutil工具

gacutil /i myown.dll

For more info: 有关更多信息:

http://msdn.microsoft.com/en-us/library/ex0ss12c%28v=vs.80%29.aspx http://msdn.microsoft.com/zh-CN/library/ex0ss12c%28v=vs.80%29.aspx

You can refer this page for doing so programmatically: 您可以通过编程方式参考此页面:

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/7d3165cf-ca3b-43cc-8f77-a46dbf38f13d/ http://social.msdn.microsoft.com/Forums/zh-CN/csharpgeneral/thread/7d3165cf-ca3b-43cc-8f77-a46dbf38f13d/

You can otherwise use Microsoft Windows Installer for deploying your application : 否则,您可以使用Microsoft Windows Installer来部署应用程序:

http://codefornothing.wordpress.com/2007/11/27/short-msi-tutorial/ http://codefornothing.wordpress.com/2007/11/27/short-msi-tutorial/

And you can find the MSI here, if need be. 如果需要,您可以在这里找到MSI。

http://www.microsoft.com/en-in/download/details.aspx?id=25#overview http://www.microsoft.com/zh-cn/download/details.aspx?id=25#overview

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM