Поделиться через


How to add a .net dll within your application setup (Windows Installer Package) using Visual Studio 2005/2008

There are two methods to do it.

Method 1: Create a registry file for registration of the DLL file using regasm.exe utility (https://msdn.microsoft.com/en-us/library/tzat5yw6(VS.71).aspx)

Ex: %windir%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe myTest.DLL /regfile:C:\myTest.reg

Now you need to import the registry within the Visual Studio Setup Project (Right-click “Registry on Target Machine”, click “Import”, and then browse to the .reg file) and build the Setup project.

Method 2: Deploy the assembly to the target computer in the global assembly cache (GAC)  

 

· Right-click “File System on Target Machine”, click “Add Special Folder”, and then click “Global Assembly Cache Folder”.

· By default, the assembly is inserted in the Application Folder (by default, it is a side-by-side installation). Drag the assembly to the Global Assembly

          Cache Folder.

· Build the Setup Project.

 

Contributor: Soumitra Mondal