Outlook 2013 Add-in not loaded after installation - c#

I have developed one add-in using Outlook 2010 AddIn for outlook 2013 with visual studio 2012. I have developed User Controls and worked with Custom Task Pane in Add In.
It works perfectly when I debug add-in from visual studio. I have created setup file using Install Shield Limited Edition (following basic steps given by forum). However, if I install that add-in and open Outlook, Add In does not load and is not visible on Home tab. Nothing happen.
I haven't made any registry entry while building setup file.
Please let me know how can i make it working.
Thanks.

You will have to make an entry to Registry. You can simply do through Install shield program.
Here is the quick screen shot:
Make sure that the loadBehaviour is set to 3.
If there is any error in the addon on load then it will set to back to 0.
It has been long time I did not developed the addon but I am sure my information is correct.
Also make sure that the you look after for 64 vs 32 bits entry.
I found a quick link for you too: http://blogs.msdn.com/b/emeamsgdev/archive/2013/11/21/outlook-deploying-an-outlook-2013-add-in-using-installshield-le.aspx

Related

Create MSI for Office Outlook Add-In with visual studio

I have create a c# application with a windows service and 2 vsto projects. Once the MSI has been created/installed i can see the one add-in was installed and the service is deployed as well. My problem comes in where only one of the vsto projects is installed. The one that is giving me nightmares is a Outlook visual designer ribbon. The other vsto project is a non visual add-in, and that one installs just fine. For the life of me i can't figure out why the visual designer is not installing, it is not in outlook options and not in control panel/add remove either. Compiling it from Visual studio everything works fine and runs as it should. Does anyone maybe have an idea of what could be wrong? Thanks in advance.
If you don't see your add-in listed on the COM add-ins dialog the required windows registry keys were not added properly. See Registry Entries for Application-Level Add-Ins for more information.
Make sure that you did all the necessary steps described in the Deploying an Office Solution by Using Windows Installer article.

How to add a launch condition of searching for a process in a setup project c#?

I have made a setup project for my Outlook Addin in C#(Visual Studio 2010). I want to add a condition to my setup project for Addin which prompts the user to close the outlook if it is open else continues to Install. I'll appreciate any help on this.
Also tell me if somehow we can restart the outlook at finish of installation.
It's possible if you are using VS to create a setup project, but to make it works you have to write a little code blocks and make some settings. Hope these posts will help you how to do that.
How to: Get an Instance of Outlook
Extending Visual Studio Setup Project
Launching Your Application After Install using Visual Studio 2005

Issues getting a 2010 VSTO outlook plugin working on Outlook 2013?

I have an outlook plugin built with Visual Studio 2010 (.net 4.0 Client Profile), that works fine in Outlook 2007 and Outlook 2010. I just tested on 2013 and even installing the addin seems to crash. After googling, I see a few examples of issues people have faced but fundamentally can't get a straight answer to this question:
Is there any prerequisite that would not allow a VS 2010 Outlook addin to just work on 2013 or do I need to upgrade Visual Studio and Create an Outlook 2013 specific version of my addin?
The Running Solutions in Different Versions of Microsoft Office article describes all details. It states the following:
If you developed solutions for Office 2010, you can run the same solutions in Microsoft Office 2013. Solutions that were created by using Visual Studio 2013, Visual Studio 2012 or Visual Studio 2010 can run in Office 2013, Office 2010, or the 2007 Microsoft Office system.
What is the target .Net framework of your add-in? Did you try to debug the code? Do you get any exceptions?
Do you have Outlook 2013 on the machine you have the add-in project on? If you do, you can debug from VS 2010 by setting the "Start external program" in the Debug tab of the project properties window to the Outlook 2013 .exe. When I created my add-in I was able to debug it using whatever version of Outlook was on my development computer and I don't remember changing anything other than the external program path.
If you are using setup project for the installation it needs a different ComponenedId when you create its launch conditions. You'll need two different setup projects to install on Outlook 2010 and 2013. Here are the Office 2013 PIA keys and Office 2010 keys.
Did you try enabling the add-in again? It won't run after its in the disabled queue. After you re-enable it from the disabled add-in screen, you can then check the box in the COM-AddIn screen to have it load which then should prompt you more detail since you set the VSTO_SUPPRESSDISPLAYALERTS variable about what may have happened in the first place.
The problem can be that the add-in had been hard disabled by Outlook. Notice that the add-in did not show up under Inactive Application Add-Ins, but rather under Disabled Application Add-Ins. That makes a difference: In the latter case, just going to the COM-AddIn screen and ticking the check box is not enough to solve the problem.
Follow these steps for hard disabled add-in?
Goto the Manage box, change COM Add-ins to Disabled Add-ins, and then
click Go. Select the add-in and click Enable. Click Close. OK, now
the add-in can be loaded again:
In the Manage box, change Disabled Add-ins to COM Add-ins, and then
click Go. select the check box next to the disabled add-in. Click
OK.
Reference THIS site for further details.
I vaguely remember encountering an AddIn crashing on installation in the past... resolution is:
Install Visual Studio 2010 Tools for Office Runtime on the target machine.
Try the VSTO AddIn install again and you wont get the crash during installation.
Before trying to install it, you can try to run it trought the debugger to have more info on the real problem. As far as I remember, you just need to go to your project properties and change the launched version of outlook while debugging...
You can follow this link for more info : http://www.greycastle.se/vsto-project-office-target-version/
Assembly Loading issues are difficult to debug because there are at least two layers to this when dealing with Managed and Native code.
When an executable is started the native loader must find the file, load it into memory along with all the dependent DLLs to make it run.
The native loader looks into the assembly manifest to determine this information and then simply hunts down all the DLLs and load them into memory (in order).
You can easily see this process using WINDBG and pointing to an EXE and running it from Windbg. The list of modules being loaded is the native loader at work.
If a dependency is a .NET managed code assembly then the native loader transfers the loading request directly to the managed loader, known as "Fusion".
You can easily set up the FusionLOG viewer to see what is happening http://msdn.microsoft.com/en-us/library/vstudio/e74a18c4%28v=vs.100%29.aspx
Failures of loading at either the managed layer or within the managed layer are easily spotted either through WINDBG for Native or the Fusion Log View for Managed code.
A few hints on Managed DLL loading: If an assembly holds a reference to a dll that is not included in that assembly, there is a strict order of "probing" which is followed to find the dll. There will be a minimum of three attempts to find the DLLs in different places such as in the assembly, in the program root path and in the GAC. If the three attempts fail, loading is stopped at that point and the program will not run. When this happens it is often considered a system level environmental issue; however, in reality it's a programming issue because unless pre-requisites are fully know by the system administrator there is no way they can guess at this stuff. If you are a programmer who is including other dependent dlls you should always consider whether or not to place them into the assembly to stop this problem. Otherwise you, the system admins, and folks using your program will have to wait until the root cause is determined which takes a long time.
You may say, well I was told by another department to use this dll and I have no idea what the other dependencies are! This is no excuse, as there are excellent tools such as ILDASM and even managed code Dependency walkers that will tell you everything that's needed. The best way to package these "other" dlls is to simply include them in your assembly.

Distributing Outlook Add-In from Visual Studio 2012

I've written an Outlook add-in for our office that I'd like to make available to others for testing.
My Googling has indicated that I should make an InstallShield project in the solution and use that, however my Visual Studio install only opens an InstallShield download page for which there is a dead link.
Following this failure, I attempted to manually add the add-in to Outlook by utilizing the files in the bin directory, but it tells me that it is an invalid add-in.
I'm at a bit of a loss here on how to proceed in making this add-in available for distribution.
You could use click-once, right click the outlook project in solution explorer and select publish and follow the wizard. The only problem would be that you will need to sign the click-once app because office addins are particular about security.
This question has further details.

Visual Studio Add-in - How do I create an Installer?

I have made a Visual Studio Add-in as part of a project I'm working on using web services.
When I created the new Add-in project in visual studio it generated all the code required and installed the blank add-in on my pc (I assume).
Since this is a large project we are using svn to manage the code base and once I had done some of the work on the Add-in I commited it, then checked it out on a different pc and attempted to run it.
However on the other pc when I run the add-in in debug mode, the tools entry for the add-in is not present and I can't run the add-in.
Am I right in assuming that when I created the project on the other pc it installed the plugin as well? And does that mean that I will need to create an installer for any other pcs I wish to use?
Obviously at some point I intend on making an installer anyway but not untill after the development of the addin is complete.
Ok so I fixed my issue.
after doing some googling into a different issue I was having I stumbled apon the answer to my installer issue.
When the visual studio Add-in wizard creates your blank add-in it creates two xml files with the .Addin extension.
One of these is saved locally along with your project the other is copied to whatever path that copy of visual studio uses for its add-in folder.
So by copying the .addin file to the correct location on my other pc I can now run the Addin in both locations.

Categories