I've developed an Add-in for outlook in Visual Studio. When I run it, it opens up outlook correctly but does not show the Add-in within the COM list of add-ins.
I assume it's something to do with the registry, but can't seem to find the problem. When running the application I can see it creates a registry within the HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSTO path and another within HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins that contains the Manifest with the correct file path to the VSTO project.
Am I missing something?
Thank you in advance.
It is not clear where your windows registry keys were added.
If the installer is targeting all users on 64-bit Windows, it is recommended that it includes two registry entries, one under the HKEY_LOCAL_MACHINE\Software\Microsoft and one under the HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft hive. This is because it's possible for users to use either 32-bit or 64-bit versions of Office on the computer.
If the Installer is targeting the current user, it doesn't need to install to the WOW6432Node because the HKEY_CURRENT_USER\Software path is shared. For more information, see 32-bit and 64-bit Application Data in the Registry.
The Deploying a VSTO Solution Using Windows Installer article describes all required steps for creating MSI installers for Office COM add-ins. Also take a look at the Registry entries for VSTO Add-ins article which explains where windows registry keys should be added for VSTO/COM add-ins.
Answering my own question for someone facing the same issue.
Running a repair on Office fixed my issue. To my understanding it repaired some registry key mappings.
Related
After installing my VSTO addin with a MSI package installer(Created by windows installer project), I am getting the following error:
Microsoft.VisualStudio.Tools.Applications.Deployment.AddInAlreadyInstalledException: The customization cannot be installed because another version is currently installed and cannot be upgraded from this location.
[NOTE: As I have a Windows 10 x64 OS with x32 Office solution, to make my addin visible in Outlook I have to move my setup installed registries manually from:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\Company.OutlookAddin
to
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\Outlook\Addins\Company.OutlookAddin]
The Addin works fine(after above mentioned manual changes) in VS debug mode.
From few days I am trying to solve this and tried the following methods:
Remove program by install/uninstall program menu(inside control panel)
Changing Setup product key and reinstalling.
Removing Registries(with GUID) from VSTA(which was already empty) and VSTO.
Removing other related registries by searching them through Registry Scanner
Using a Fix it package from Microsoft
Deleted the click-once cache by deleting everything in: %APPDATA%\Local\Apps\2.0
Maybe I am missing to change any other registry key manually which points to the current registry key(with manifest).
Can anybody please help me here?
You can delete the click-once cache by deleting everything in:
%APPDATA%\Local\Apps\2.0
You could also find and delete only what relates to your add-in but that is not easy as everything has random names.
This should allow you to install again. In the future, be sure to increment the version so the system won't think it is already installed. You shouldn't have to do any manual registry edits.
I have c# outlook addin created in visual studio 2013.
It has windows forms also.
I am getting mad on generating msi file, any easier solution/steps for me, please ?
Mainly tell me, after completing the process, where do I find the final MSI file (like bin/release folder) ?
I installed this - https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d
as well as installshield limited edition installer.
I was able to build it and ran the installation file(.exe) from disks folder and it is installing but not showing anything in the outlook.
Take a look at the Deploying an Office Solution section in MSDN. It describes two possible options for deploying your Office solution in depth:
Deploying an Office Solution by Using Windows Installer
Deploying an Office Solution by Using ClickOnce
It is up to you which way is to choose.
I was able to build it and ran the installation file(.exe) from disks folder and it is installing but not showing anything in the outlook.
There are multiple reasons why you don't see your add-in in Office applications.
First of all, make sure that you did all the steps described in the previously mentioned articles. Then I'd suggest checking the required windows registry keys for COM add-ins, see Registry Entries for Application-Level Add-Ins for more information.
Microsoft Office applications can disable add-ins that behave unexpectedly. If an application does not load your add-in, the application might have hard disabled or soft disabled your add-in.
Hard disabling can occur when an add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your add-in is executing.
Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event handler is executing.
You can read more about that in the How to: Re-enable an Add-in That Has Been Disabled article in MSDN.
Finally, you may also check out the Trust Center settings in Outlook. The Macro Security settings can be applied to add-ins as well. May be it is required to sign the add-in with a digial signature and etc.
I am using VIsual Studio 2013 to create Addin for Outlook 2013. My VSTO itself is creating a registry entry for HKCU. So the user who installed it can use the Addin. Since it is not creating a entry for HKLM , other users cannot see the Addin while the outlook is open in their own profile.
I went through all related topics tagged here and tried everything.But everything was disappointing for me.
I tried to create a set up project and created the registry path as below.
HKLM\Software\Microsoft\Office\Outlook\Addins\Addin_ID
But the Windows is creating the entry in the below location.
HKLM\Software\Wow6432Node\Microsoft\Office\Outlook\Addins\Addin_ID
Just wondering if the VSTO alone could create an entry HKLM like it is creating an entry in HKCU now. Or it always need a set up project to create entry in HKLM. Please advise on how it can be done.
Your replies will be highly appreciated
No, ClickOnce deployment is a user specific way of deploying. You don't needs administrator rights and that is the pretty part. The problem is: you have to install every user separately. Not only the registry is a problem here, the location of the files is too (the files are stored in the user profile).
You can use a MSI package instead if you want to install it for all users at once.
I have made an Excel Add in (Ribbon).
When i run the .vsto and install it, i've one installation under Programs in Windows.
But, when I open my Excel program, another installation appears in the Programs-list.
Why is that and it shouldn't be like that right?
Update:
I notice in Application I have set Target framework: ".NET Framework 4 Client Profile"
and in Publish - Prerequisites it adds a Microsoft .NET Framework 4 Client Profile(x86 and x64), has that anything to do with it?
This can happen when you install the VSTO on your development computer. This is because when debugging the VSTO it will get installed though it won't show in the Programs & Features list. The VSTO will remain installed even after debugging is stopped. Even when performing a proper installation, remnants of the debugged VSTO will remain in the registry.
I've found the best way to work around this (though not ideal) is to manually remove the registry key at this location before performing a proper installation:
HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\[YOUR VSTO PROJECT NAME]
Because maybe in configuration you have set the application to update itself automatically.
So after Excel startup, it tryes to auto-update.
Is it possible?
It is very common to find two instances of the same add-in on your Excel application in a development machine. Since you must be building that add-in code inside your IDE before publishing or making a setup project build.
Whenever Excel starts it automatically detects the add-in manifests that are present on your computer.
Since you also installed your add-in your machine now has two locations where it finds your add-in one in your project folder and another at the location where you have installed the add-in.
So excel will, on its own add two add-ins because it found two add-ins, as simple as that.
And it has nothing to do with your Publish pre-requisites and Target framework.
You can simply go to FIlE->Options->Add-Ins-> over here in the window you'll find a Drop down with the label saying "Manage", in that select COM Add-ins and click on 'GO'.
Now in the window that opens, you'll find both your plug-ins listed there, you can remove the plugin that you do not want to see on your Excel app.
But, anyways the next time you build your excel add-in and start Excel it will again add that add-in automatically to your Excel app.
So it would be better not to install the add-in which you make on your machine until you want to test the installer or something like that.
I've created a simple Outlook add-in and I can't seem to get an install package together correctly.
Specs: Visual Studio 2010 (C#), .Net 4.0, Office 2007
The add-in works perfectly in my development environment and appears to install successfully with the setup file I created (using http://blogs.msdn.com/b/mcsuksoldev/archive/2010/10/01/building-and-deploying-an-outlook-2010-add-in-part-2-of-2.aspx).
The problem is once Outlook is reopened after the install, the Add-in is nowhere to be found. It shows up as an "Active Application Add-in", yet it's not available on the ribbon like it is when I run the add-in through Visual Studio. Do I need to hard-code it in the ribbon somehow? Also, I noticed if I manually open the VSTO file and install it, all seems perfect again. Thanks for your help!
There's a lot that can go wrong with a VSTO installation. Here's what I think may be going wrong in your situation:
If you're installing the add-in on your development machine then try a different machine instead. Debugging the add-in on your development machine sort of registers the add-in with Office via some registry keys but that registration info doesn't get cleaned up. (You can certainly clean those keys up yourself and then try your add-in's installer but I recommend a clean machine just in case.)
Try the installation without |vstolocal in the manifest path. I know Microsoft recommends including it but in my own experience it prevented my add-in from loading, and using a normal path fixed the problem.
If you're installing to Office 32-bit on a 64-bit machine then you'll need to write your registry keys to HKEY_LOCAL_MACHINE\Software\ Wow6432Node\Microsoft\Office...
Consider installing your add-in using VSTOInstaller.exe instead of manually writing the registry keys. (I tried to write the registry keys myself but Microsoft's own documentation -- rather, random blog posts -- for doing this is not thorough enough and sometimes just plain incorrect and misleading.)