install manually my word add-in VSTO (Ribbon)? built with c# - c#

Is it possible to manually install my word add-in?
Visual Studio is preparing an installation file for word add-in and it worked great but i want to build more complex installation file. if i knew how to do it manually it would be very easy to build my own installer.

Sure its possible.
If you use Visual Studio 2013, you have two common options to deploy your addin.
One is to use publishing, also known as, Click-Once, this basically does all the dirty work for you, and leaves you with an executable that helps you deploy it on your target machines by simply double clicking it.
The other method is to use the InstallShield.
Go to File > Add > New Project > Other Project Types > Setup and Deployment > Installshield ...
You most likely do not have install shield installed, so once you try to choose that project a webpage will pop up, asking you to register (quickly and freely) to download and install Install-Shield limited edition - do it, its quite fast.
When its done, you may add a setup project to your solution.
now this part is very user-friendly, and allows you to build a custom install to your liking.
Notice that the free "limited edition" as they call it, gives you quite a lot of features, so it should be enough for light weight word addin.
Now, placing the focus on the Word Addin, the whole idea of the install is to place about 4 registry values into the deployed machine to point to the dll you compiled, and describe it.
You can find all the information you need by following microsoft's step-by-step guide on deploying an addin. its very fun and simple. really!
https://msdn.microsoft.com/en-us/library/ff937654.aspx
Good Luck !

Related

Include missing dependencies in VSTO setup

I created a basic install for my VSTO Excel plug-in by publishing my project.
It pretty much worked ok except for some reason it missed 2 dependencies, dll's which are needed to communicate with our SAP system.
Did loads of Googling but I can't find a way to add them in Visual Studio.
I tried downloading the setup project type from MSDN, but wierdly when I built the install it included the SAP dll's but it didn't install my plug-in! There doesn't seem to be much info on how to do this with VSTO, or at least I couldn't find it.
However I note from MSDN that there are a lot of problems with that template, so it's possible it doesn't work for VSTO stuff.
So, a workaround is obviously to run both - and that works ok - but it isn't ideal and (understandably) not satisfactory for our support team.
I would think there are several ways to fix this problem, so if anyone could answer one or two of the following that would really help!
How can I make sure that my dependency files are included in my setup when I use Publish?
What is the correct way to create a Visual Studio 2013 Installer Project
that works correctly with VSTO?
This looks like an answer to question 2:
https://msdn.microsoft.com/en-us/library/ff937654.aspx
1.How can I make sure that my dependency files are included in my setup when I use Publish?
You need to add them as a content to the target folder or make sure that files are copied to the output folder with the add-in assembly. Right click on the reference in the Solution Explorer window and see the reference's Properties. Pay special attention to the Build Action, copy to the output folder properties and etc.
2.What is the correct way to create a Visual Studio 2013 Installer Project that works correctly with VSTO?
The Deploying an Office Solution by Using Windows Installer article describes all the required steps for deploying Office add-ins.

VS 2012 addin - manually installing dll

I just upgraded (if you can call it an upgrade) from VS 2010 to VS 2012. They are now forcing you to use installshield Essentials, which is rubbish and you need to sacrifice a chicken, whilst performing satanic rituals to get it to work.
So my question, can I install the ADDIN manually? I know what registry entries are needed. I ask because I want to know if I can build the addin and then get a third party installer and use that.
Also the MS addins seem to use VSTO, can I not use a simple DLL? I ask because I see my NOD32 antivirus addin is a simple DLL.
Yes, it is enough to include in the installer the DLL, VSTO manifest file and create the registry entries as documented. This way you can create the installer with any tool that integrates in VS, like Wix or Advanced Installer(disclaimer: I work on its development). They are both free for what you need.
Sure, you don't have to use VSTO at all. On the low level, your COM addin is just an in-proc COM server (dll). The COM object exposed by the add-0in must implement the IDTExtensibility2 interface. That's it, there are no other requirements.
See: VSTO 4 ( 2010 ) Lessons Learned
FWIW, I've authored about 10 VSTO AddIn installers and half of them using InstallShield Limited Edition. It actually works really well once you fully understand the deployment requirements and how to use the tools. The primary problem with ISLE is that it does hide a lot of the functionality that's in Windows Installer and more fully explosed by InstallShield Professional Edition.
ISLE allows you to consume setup prerequisites (.PRQ files) but doesn't provide an editor to tweak them if needed. Using an eval version of InstallShield and then back porting the changes to ISLE works nicely there. Also the use of Windows Installer XML (WiX) to create merge modules that get consumed by ISLE solves most of the other problems.
I've got this type of installer template down to the point of taking < 8 hours per project including
project management, testing and close out. Someone brand new to installers should expect to take several months to get something that "seems" to work.

Installer for C# App

I'm developing an open source C# application. For awhile now, I've been using a basic .NET installer I coded myself. However, with a recent change, that is no longer practical for me, as I'd have to add a large number of files to the installer - and they may change with each release. A ZIP file is also not practical.
I've done some checking online, I see a lot of MSI, ClickOnce, Self-extracting ZIPs, and (imo the most promising) the NSIS system. None of them seem to exactly fit my needs, so I'm looking for advice on which system to use.
Actual installing of my program is very simple. Basically, I just need to copy the bin\Release directory (and all subdirs) to the client's computer. I've been achieving this somewhat ad-hoc, by embedding every file in my .NET installer, and maintaining a file table of what goes where.
Unfortunately, I just localized my app. I now have 30+ .resx files (Which are compiled to dlls and placed into MORE subdirectories by Visual Studio) and, obviously, it's impractical to add 30+ folders and DLLs to my installer. Hence why I'm on this search.
There's also a few other requirements:
The installer should search predefined directories for a specified .exe. (My app is designed to be a drop in replacement) If the .exe is not found, it should prompt for its location
The installer should verify that "OldApp.exe.bak" exists. If not, it should rename "OldApp.exe" to "OldApp.exe.bak"
The installer should update files. Ie, if "Culture.de.dll" hasn't changed, the installer will leave it alone.
The installer should work with all Windows versions of all .NET IDEs (VS, SharpDevelop, Mono, ect) but does not need to work on other platforms.
When I build the solution, the installer should be automatically regenerated. In other words, it should be run-able for by "Post-build" section.
The installer generation must be able to be added to a source code repo. This is so that anyone who downloads the source of my app can compile the installer as well.
Sorry for the long post, I figured it was better to post more than less.
I'd recommend SharpSetup. It combines WiX and C# for a pretty flexible implementation. Not much I've found it can't accomplish.
We use WIX extensively: http://wix.codeplex.com/
You may have to customize your installers with some exit routines to do things out of the ordinary, but there are hooks in Windows Installer framework that let you do that.
You can put these definition files (XML) in your source control, and you can configure a build to execute the installation. However, anyone that gets your source would need to have the WIX utilities installed.
I would recommend NSIS. From my experience any installer feature that I have required has been covered in NSIS documentation or community examples. I can't comment on NSIS integration with Visual Studio as I use NSIS integrated with my Jenkins build server. There appears to be a free Visual Studio Add-In called Visual & Installer which provides NSIS integration with Visual Studio. I have not personally used it but it appears to be currently actively developed so might be worth checking out.
WIX is a good one. According to Wikipedia, it is used by Microsoft to produce installers for some of their own products.

how to use VS Setup and Deployment project and build an .msi file to install the program?

i wanna deploy a C# Windows Application project using Setup and deployment project technique
but i don know what should i use
after i open File > New > Project > Setup and deployment > ....
then what ,, what should i do next
In the past I've used the Visual Studio Setup Project or Innosetup for my programs. I prefer to build .msi's over exe's so Visual Studio Setup Project has been my goto for a while now. It is however, very lacking in capabilities. The interface is not intuitive either in my opinion. Every time I build an installer there is a lot of trial and error install/uninstall to get it right. Other's have pointed out WIX and I've looked into it. It appears to be very flexible and since it is open source, we should be able to count on it for the long term.
Here is a recent article about WIX. What I found interesting is the article claims (see link in article) that Visual Studio Setup Project is being End Of Life'd in VS 2010 + NEXT_VERSION. This is a little disconcerting to me. Since I don't want to begin to rely on the new Install Shield "Lite" in VS, I'm going to put effort into learning WIX. I hope it'll pay off in more flexible builds for my applications as well.
All that said, when creating a VS Setup project, I usually use the wizard to put in the initial plumbing. You'll point it at the files you want in the .msi. Typically for me this means the "outputs" of one or more programs in my solution. Any managed assemblies referenced in the programs will automatically get picked up as dependencies and included. Unfortunately unmanaged assemblies don't and I usually have to add them manually using the "File System Editor" mode in the Setup Project UI. Adding shortcuts is a little hokey as well. You right click under the start menu and desktop section of the "File System Editor" mode and select create shortcut. This is all by memory so hopefully I'm getting this right. You will certainly have to test your installer multiple times before you get it just how you want. I like to test under a VM as well.
Finally, the VS Setup project produces a setup.exe and .msi file. Setup.exe is used for detecting and installing dependencies (such as .Net) before unpacking the actual DLL.
When u do this File > New > Project > Setup and deployment >
then right click Application folder> Add > File...and add your app's .exe file and also you can add shortcuts of your app in desktop and program's menu
I would recommend you to go for some tool for creating msi.
I am using WIX
What you need depends on... what you need.
For a large percentage of applications, all you need the installer to do is let the user choose an install location, copy files to a directory structure at that location, and create a few shortcuts. For that, a Visual Studio Installer -> Setup Project is fine. It can handle this basic functionality, as well as installing prerequisites like the .Net Framework redistributables, providing custom install options, and/or writing simple registry keys. The Setup Wizard creates a Setup Project as well, but runs you through a wizard to set up the basics. This is a good option if you've never created an installer before.
If you want this application to be controlled by a larger, more custom install, choose the CAB Project; it will simply pack the necessary files into an archive that is easily accessible from another setup project.
If you are publishing a class library, use a Merge Module. Merge Modules work within install programs themselves, providing files needed for the main application to work.
If you need serious customization, or you want to interface with existing InstallShield logic, I'd get a third-party installer. I've worked with InstallShield before, and it's pretty full-featured, but by the same token, the installers it creates are applications in their own right and can take days or weeks of logic programming to "tweak" to your satisfaction.

Create program installer in Visual Studio 2005?

I'm a web-guy stuck in "application world" in VS 2005. I created my windows forms program and want to give my end users the ability to install it (and some of it's resources) into a standard Program Files/App Directory location along with a start menu/desktop launcher.
The help files don't give any instructions (that I can find). This seems like such a trivial task to create an installer - but it's eluding me.
Any hints would be greatly appreciated!
You're looking for a "Setup Project" which should be under the "Other Project Types" -> "Setup and Deployment" category in the "New Project" dialog.
I would suggest using something WiX (windows installer XML). Its the toolkit most products from codeplex or OOB code drops use, and its pretty easy to get the hang of.
There's also (in version 3) an IDE add-in called Votive to help make things 'easier'.
Personally I find using WiX more flexible then using the built in Visual Studio installer template, though your means might vary. Take a look at http://wix.sourceforge.net/ and there's also a great tutorial at http://www.tramontana.co.hu/wix/.
If it seems kind of hard to start off with, persevere - I did and now I find it perfect for what I need.
Another option is Inno Setup, a third-party installer which is free, easy to use and excellent:
Inno Setup
The exe file is actually just a boostrap loader, which launches the MSI file. The MSI file is the actual installation file.
Add a "Setup Project" project to your solution. New Project > Other Project Types > Setup and Deployment. You can then choose what is installed and where.
The Setup Project is the way to go. If you're going to be deploying the installer from a web site, I recommend creating an MSI file as the project output (as opposed to a Setup.exe output). Most of my clients block the download of EXE files.

Categories

Resources