- Insert a setup project to the addin solution
2. Add the necessary files to the newly created project: I have created two folders in the application folder, and in the “Bin” folder, I added “the project output”, which includes the Addin DLL and all the dependent assemblies. While in the “grammars” folder, I added related grammar “GRXML” files.
3. Select the setup project, and then property window, configure the icon of the installed program. This icon will be shown in the Control Panel > Program and Features, when users install or unsintall the program. You can additionally configure the manufacture name, product name and many other details, this will affect the default installation folder.
4. Right-click the installation folder, and click the “property window”, edit the default location to a descired one.
5. In order for your setup project to automatically register the Add-in DLL on the target machine, you can manually type “regasm YouDll.dll /codebase”. To include this auto-registration feature:
- Add the two files “AutoRegAsm.cs” and “AutoRegAsm.Designer.cs”;
- Open the two files, change the namespace to be the same as the one for the Add-in DLL;
- Add a reference of System.Configuration.Install to the add-in project;
- Right-click the setup project -> view -> Custom actions, in the “install” and “commit” node, add the dll or the “project output” as the executable;
- Recompile the solution.