Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Registering dll's in the GAC using Visual Studio Installer

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.

like image 771
Vidar Avatar asked Dec 07 '22 05:12

Vidar


2 Answers

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

like image 65
Hans Passant Avatar answered Jan 12 '23 05:01

Hans Passant


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

like image 29
user229061 Avatar answered Jan 12 '23 03:01

user229061