Registering dll's in the GAC using Visual Studio Installer

青春壹個敷衍的年華 提交于 2019-12-10 15:37:19

问题


I want to register/unregister my project's assemblies in the GAC using Visual Studio's Setup installer project.

I am thinking of using a custom installer to utilise the Install() and Uninstall() methods to write commmandline (in code) commands via the gacutil.exe.

Is there an easier way - or is this the way you would do this? Please keep responses within the scope of using Visual Studio tools (not Installshield or WISE etc)

Cheers.


回答1:


You cannot rely on gacutil.exe, it will not be available on the target machine. Only machines that have the Windows SDK installed have it. The Visual Studio Setup project supports registering assemblies in the GAC without any custom tool. Right-click "File System on Target Machine" and select "Global Assembly Cache Folder".




回答2:


You can install assemblies to the GAC by adding a Global Assembly Cache folder as part of the destination file system.



来源:https://stackoverflow.com/questions/1889906/registering-dlls-in-the-gac-using-visual-studio-installer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!