Deploying Add-Ins

At some point when you are developing add-ins, you may find that you want to install and run them on another computer, a process known as deployment. Visual Studio 2005 has a special project type called a Setup Project that allows you to do this. To enable your add-in to be deployed, you simply add a new setup project to your add-in's solution. The setup project, when compiled, creates a Windows installer (.msi) file which, when run on the target computer, installs the necessary files. For a Visual Studio 2005 add-in to run on a target system, it must have the add-in's compiled assembly file (.dll) and its supporting XML registration file (.addin), as well as any dependent assemblies, such as EnvDTE.dll and EnvDTE80.dll.


The following steps demonstrate how to add a setup project to your add-in and how to deploy it on a target computer.


  1. Load a Visual Studio 2005 add-in solution. If it has not already been built, then build it.

  2. Add a new setup project to the solution. To do this, click File / Add / "New Project," and then select "Setup and Deployment" / "Setup Project."

  3. Give the setup project a name, such as MyAddin1_Setup.

  4. Right-click the setup project and select Add / "Project Output" / "Primary Output."  This adds any dependent files that the add-in requires, such as the EnvDTE and EnvDTE80 assemblies, and it displays the File System Editor in Visual Studio 2005.

  5. In the File System Editor, create a custom File System folder node. To do this, right-click "File System on Target Machine" / "Add Special Folder" / "Custom Folder," and then name it AddIns Folder. You must create your own custom folder because there is no preset target name for the AddIns folder, and that folder is required for add-ins to be recognized by Visual Studio 2005.

  6. In the AddIns Folder properties window, click the DefaultLocation property and enter [PersonalFolder]\Visual Studio 2005\Addins. This is one of the default places where Visual Studio 2005 looks for add-ins.

  7. Right-click the AddIns Folder node and then click Add / File.

  8. Add two files: the add-in's DLL file (such as MyAddIn1.dll) and the add-in's .addin file (such as MyAddin1.AddIn).  These are the files that will be copied into the target's Addins folder.

  9. Build the project.  This creates an .msi installation file.

  10. Copy the .msi file to the target system.

  11. Run the .msi file on the target system.  This installs all the files you specified in the setup project.

  12. Run Visual Studio 2005.

  13. Click Add-in Manager on the Tools menu.

You should see your add-in appear in the list of available add-ins, ready to be loaded.


Another alternative option you can employ that is new to Visual Studio 2005 is called ClickOnce Deployment. This new type of deployment method allows you to publish Windows-based applications to a web server or network file share. This is a good way to create a centralized installation point for an add-in if you have to deploy it to several computers on a network or to customers with web access who live in various locations around the world. For more information about ClickOnce and how to set up your projects to use it, see the following topic in Visual Studio 2005 Help: ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_deploy/html/abab6d34-c3c2-45c1-a8b6-43c7d3131e7a.htm.


After you deploy an add-in as an .msi file on a remote system, you can remove it by going to Add/Remove Programs in the Control Panel and selecting it from the list of installed programs. To remove an add-in and its components from a local system, see the following Help topic:

How to: Deactivate and Remove an Add-in -- ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_extcore/html/5d9bc34f-ab3b-4477-950f-79fb820acb8c.htm


There are also a number of Help topics that more fully describe the available installer options, such as the properties you can use to create custom installation folders, how to deploy COM and Windows apps (and add-ins) on web sites, and so forth. For more information, see the following Help links in Visual Studio 2005:


Walkthrough: Deploying a Windows-based Application -- ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_deploy/html/02cbce50-6fc2-4b89-bc32-3720a7651087.htm


Files, Folders, and Deployment -- ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_deploy/html/92e6c2e4-3567-45b8-9ca9-4df5aded22e3.htm


Kemp Brown, programmer writer

Comments (10)

  1. Carlos Quintero says:

    Do you really need to ship EnvDTE.dll and EnvDTE80.dll, etc. with your setup? Can´t you assume that they will be on the target system if VS 2005 is installed, which is a prerequisite for any add-in?

    In the past (VS.NET 7.x) there were problems with some add-ins shipping EnvDTE.dll, VSLangProj.dll, etc. because when uninstalling the add-in, those components were removed too, breaking other add-ins…

  2. Jakir says:


    The links that you give to ths MSDN help false.

    If you can,send me the true links.

    Thanks a lot


  3. Jim Glass Jr says:

    Jakir, you can also search on the title. I’ll have Kemp look into the link stuff.

    Carlos, once again you are correct. I will have Kemp relook this blog.

  4. Kemp Brown [MSFT] says:

    [Apologies for the late reply. We’ve been busy with the VS SDK rewrites and I was on a 1.5 week vacation.]

    Hi Jakir,

    I just double-checked the Help builds we have and the links are the same as I posted above, so I’m not really sure why they don’t work for you. Things are still a bit in a state of flux Help-wise, so it could be that the links were updated between the B2 build and the latest build. In a nice bit of poor timing, our Beta2 build server is currently down for maintenance, so rather than give you possibly more bad links, I’ll instead give you keywords you can type in the Help index to find the topics. This should work regardless of the recent builds.

    – Look for "add-ins [Visual Studio], removing" in the Help index to find the topic on removing add-ins.

    – Look for "deploying applications [Visual Studio], creating installers" in the Help index and then select "Walkthrough: Deploying a Windows-based Application" in the Index Results window.

    – Look for "files, deployment" in the Help index and then select "Files, Folders, and Deployment" in the Index Results window.

    I hope this helps you locate the topics, and I apologize for the MS-Help link snafu. If you run into any problems with this, let me know.


    Hello Carlos,

    I discussed this issue with the QA team and they confirmed that in case of add-ins that work with VS 2005, you can safely assume that all of the necessary .dlls will be present on the target system. (That is, the files are provided by the VS 2005 installation.) VS 2005 features a new deployment type called XCopy Add-in Deployment, which means that all you need to copy to the target system is the addin’s dll and its .Addin registration file. In our test bed applications, we just copy the .addin file and the corresponding add-in dll to the Addins folder and everything works. There is no need to include the EnvDTE/EnvDTE80 .dll’s in the setup project. I will update the procedure in our Help topic to reflect this.

    For shared add-ins, however (VS 2005-created add-ins used in MS Office), you must add one additional file, Extensibility.dll, to the setup project along with the .Addin reg file and add-in dll, but it should be marked not to do any registration.

    There was some discussion about adding Extensibility.dll to the VS 2005 PIA redist so that you wouldn’t need to include it. At this writing, however, it’s not clear whether this was done or not. If it did happen, then you would use the .msi install file instead of including the dll in your setup project. If it didn’t happen, then you would need to explicitly include it in your setup project. I’ll post any updates on this issue when they become available.



  5. Kyle Finley says:

    Jim Glass has a good post giving simple instructions for building a setup project for a Visual Studio…

  6. Jahidiitr says:

    I devloped an addin for office 12 using VSTO and to make a setup,i went through the steps given above but while adding the files to setup project , i did not find any file with .addIn extension? can you please help ! why there is no .addin file ?


Skip to main content