How to distribute/deploy a Visual Studio Add-in - visual-studio-2010

I created my own Add-in with Visual Studio 2010. This Add-in is loaded at the startup of Visual Studio and it adds an entry in the Tools menu. The action of the Add-in is executing by clicking on its entry in the Tools menu.
The Add-in works well, but now I want to create an installer or something to deploy it on others computers.
I tried to create an MSI project, but I don't know where to copy the dll of the Add-in and how to register it in Visual Studio.
Then I tried to create a VSIX project, I managed to install the extension but my entry in the Tools menu is not visible/displayed.
Anyone knows a good way to deploy the Visual Studio ?

VSIX installers are used for deploying Visual Studio 2010 extensions. I'm not sure it works for add-ins. I would go with MSI. Here you will find a tutorial:
http://www.codeproject.com/KB/install/AddinCustomAction.aspx

Related

Create Setup/MSI installer in Visual Studio 2017

I have written an outlook add-in VSTO in Visual Studio Pro 2017 (VB.NET). I have published it which creates a setup.exe which is OK but I would like to create a proper installer that copies the files locally and can be run silently etc.
How do I go about doing this? When I go to create new project there is no installer project option.
You need to install this extension to Visual Studio 2017/2019 in order to get access to the Installer Projects.
According to the page:
This extension provides the same functionality that currently exists in Visual Studio 2015 for Visual Studio Installer projects. To use this extension, you can either open the Extensions and Updates dialog, select the online node, and search for "Visual Studio Installer Projects Extension," or you can download directly from this page.
Once you have finished installing the extension and restarted Visual Studio, you will be able to open existing Visual Studio Installer projects, or create new ones.
Other answers posted here for this question did not work for me using the latest Visual Studio 2017 Enterprise edition (as of 2018-09-18).
Instead, I used this method:
Close all but one instance of Visual Studio.
In the running instance, access the menu Tools->Extensions and Updates.
In that dialog, choose Online->Visual Studio Marketplace->Tools->Setup & Deployment.
From the list that appears, select Microsoft Visual Studio 2017 Installer Projects.
Once installed, close and restart Visual Studio. Go to File->New Project and search for the word Installer. You'll know you have the correct templates installed if you see a list that looks something like this:

Can't integrate Visual Studio 2013 with an add-in

I have an add-in that works with Visual Studio 2008, 2010 and 2012. All I have to do is to copy some files to c:\users\username\documents\Addins folder, and then check the relevant line in VS Add-in Manager.
I've just installed Visual Studio 2013, and I'm trying to integrate it with that add-in. It does not work. I googled and it says something about changes to add-ins... new VS packages... I lost it.... Just want to make it work with no major changes. Do you know how to?
Thank you
Make sure your .addin file lists support for VS 2013:
<HostApplication>
<Name>Microsoft Visual Studio</Name>
<Version>12.0</Version>
</HostApplication>
And the directory to copy files is usually documents\Visual Studio 2013\Addins.
It would be best to convert it to a VSPackage as AddIns are depreciated in VS 2013. As with any other future updates from MS you wouldnt want that to break your addin each time would be the risk.
http://msdn.microsoft.com/en-us/library/dn246938.aspx

How do you remove/uninstall Add-Ins for Visual Studio if they are broken?

I had EntitySpaces Add-in for Visual Studio (all versions) installed. Upon uninstalling it, when you start up any version of Visual Studio, you get the message "could not rename add-in file". How do you get rid of this or stop Visual Studio from trying to load the Add-In?
It appears this can be a common problem when applications that install Add-Ins or just Add-Ins on their own, don't uninstall properly or just plain break.
For Visual Studio 2015 you have to:
Click on Tool -> Extensions and Updates.
Be sure that Installed option is selected in left part of the window.
Find your addin, select it and click on Uninstall button.
Restart Visual Studio.
There are a few helpful articles which may be useful for your particular Add-In:
http://www.mztools.com/articles/2006/mz2006018.aspx
First of all I tried this (which may work for you) How to: Deactivate and Remove an Add-In.
Note if you don't know the Namespace or ClassName of the addin, you can find it in the .addin file under FullClassName:
To remove an add-in from the integrated development environment (IDE)
Delete the .addin XML registration file for the add-in that you want
to remove. The default location is ..\Users\username\ Documents\Visual
Studio 2010\Addins\
At a Visual Studio command prompt, type devenv
/resetaddin Namespace.ClassName, where Namespace is the name of your
add-in project and Classname is its class name, for example, devenv
/resetaddin MyAddin1.Connect
For me this, although not my exact problem, lead to my resolution, which was simply to run Visual Studio as administrator. Doing this for just one version of Visual Studio solved my problem in that the error message no longer appeared (probably because it was then able to successfully rename as per the original error message).
In Visual Studio 2019, Click on Extensions tab. Then click on Manage Extensions. In the window that opens,select Installed in the left pane. After that search for the Add-in you want to remove. In the results displayed, select the Add-in the hit UNINSTALL. Restart Visual Studio for the process to be completed. The process seems to work for any Add-in.

Create MSI or setup project with Visual Studio 2012

I create a small application and I would like to create one MSI file.
In Visual Studio 2010 you have this project type under:
Other Project Types -> Setup and Deployment -> Visual studio Installer -> Setup Project
But the only thing you got in Visual Studio 2012 is "Enable InstallShield Limited Edition".
You can change the .NET Framework, but nothing changes.
Why is it not there any more? And how can I get it back? Is there a new way to do this?
Please see:
Visual Studio setup projects (vdproj) will not ship with future versions of VS
Windows Installer Deployment
It was announced 1 1/2 years ago that the project types were being killed. Alternatives are:
Use A VS2008/2010 Solution to build your installer
Switch to another tool such as InstallShield or Windows Installer XML
To create setup projects in Visual Studio 2012 with InstallShield Limited Edition, watch this video.
The InstallShield limited edition that cannot install services.
"ISLE is by far the worst installer option and the upgraded, read -
paid for, version is cumbersome to use at best and impossible in most
situations. InnoSetup, Nullsoft, Advanced, WiX, or just about any
other installer is better. If you did a survey you would see that
nobody is using ISLE. I don't know why you guys continue to associate
with InstallShield. It damages your credibility. Any developer worth
half his weight in salt knows ISLE is worthless and when you stand
behind it we have to question Microsoft's judgment."
By Edward Miller (comments in Visual Studio Installer Projects Extension).
The WiX Toolset, which, while powerful is exceeding user-unfriendly and has a steep learning curve. There is even a downloadable template for installing Windows services (ref. VS2012: Installer for Windows services?).
For Visual Studio 2013, see blog post Creating installers with Visual Studio.
Have you tried the "Publish" method? You just right click on the project file in the solution explorer and select "Publish" from the pop-up menu. This creates an installer in a few very simple steps.
You can do more configuration of the installer from the Publish tab in the project properties window.
NB: This method only works for WPF & Windows Forms apps.
Microsoft has listened to the cry for supporting installers (MSI) in Visual Studio and released the Visual Studio Installer Projects Extension. You can now create installers in Visual Studio 2013; download the extension here from the visualstudiogallery.
ISLE (InstallShield Limited Edition) is the "replacement" of the Visual Studio Setup and Deploy project, but many users think Microsoft took wrong step with removing .vdproj support from Visual Studio 2012 (and later ones) and supporting third-party company software.
Many people asked for returning it back (Bring back the basic setup and deployment project type Visual Studio Installer), but Microsoft is deaf to our voices... really sad.
As WiX is really complicated, I think it is worth to try some free installation systems - NSIS or Inno Setup. Both are scriptable and easy to learn - but powerful as original SADP.
I have created a really nice Visual Studio extension for NSIS and Inno Setup with many features (intellisense, syntax highlighting, navigation bars, compilation directly from Visual Studio, etc.). You can try it at www.visual-installer.com (sorry for self promo :)
Download Inno Setup (jrsoftware.org/isdl.php) or NSIS (nsis.sourceforge.net/Download) and install V&I (unsigned-softworks.sk/visual-installer/downloads.html).
All installers are simple Next/Next/Next...
In Visual Studio, select menu File -> New -> Project, choose NSISProject or Inno Setup, and a new project will be created (with full sources).
There is some progress for Visual studio 2013 developers :-D woot woot! See blog post Visual Studio Installer Projects Extension.
Link and information were retrieved from Brian Harry's blog post Creating installers with Visual Studio.
Have a look at the article Visual Studio Installer Deployment. It will surely help you.
You can choose the correct version of .NET framework on the page.
So for you, make it .NET 4.5. I guess that would be there for Visual Studio 2012.
I think that Deploying an Office Solution by Using ClickOnce (MSDN) can be useful.
After creating an Outlook plugin for Office 2010 the problem was to install it on the customer's computer, without using ISLE or other complex tools (or expensive).
The solution was to use the publish instrument of the Visual Studio project, as described in the link. Just two things to be done before the setup will work:
Install the PIA (Primary Interop Assembly) of Office 2010
Install the VSTO 2010 runtime

How to Add Visual Studio Add-in

I downloaded an add-in for VS (.vsix) and went to tools>add-in manager... and it doesn't offer a browse for add-ins button. I looked on the extensions one too and didn't see anything that would let me add it.
Simple question, I know, but couldn't find anything on the net that would help me. I come from VBA.
I'm using Windows XP and VS 2010 Professional.
From the answer on this question on Super User:
VSIX is a Visual Studio 2010 extension installer. You must have Visual Studio 2010 in order to install them, but you should be able to install it by double-clicking the .vsix file. Alternatively you should be able to install it from within the VS Extension Manager (Tools->Extension Manager)

Resources