I basically followed
https://learn.microsoft.com/en-us/visualstudio/vsto/deploying-a-vsto-solution-by-using-windows-installer?view=vs-2019
to create msi installer.
the install goes well and I see registry value. However, Outlook shows the add-in inactive and cannot even shows up on diabled COM plugin. Any advice is appreciated.
I am on Visual Studio 2017 and Outlook 2016 32bit.
Thank you!
Outlook loads plugin as active is the ideal.
Update:
Log shows
Invalid URI: The URI scheme is not valid.
'''
************** Exception Text **************
System.UriFormatException: Invalid URI: The URI scheme is not valid.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath, IntPtr& executor)
at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IDomainCreator.CreateCustomizationDomain(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor)
Does this mean required component missing?
Thank you,
If the application successfully loads the VSTO add-in, the LoadBehavior value changes to 3, and remains at 3 after the application closes.
There are multiple reasons why Outlook may disable your add-in. Just some of them are listed below:
Unhandled exceptions at runtime.
Any prerequisite is missing on the end-user machine.
The add-in doesn't correspond to the performance criteria that Outlook applies to add-ins.
Microsoft Office applications can disable VSTO add-ins that behave unexpectedly. If an application does not load your VSTO add-in, the application might have hard disabled or soft disabled your VSTO Add-in.
Hard disabling can occur when a VSTO 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 VSTO add-in is executing.
Soft disabling can occur when a VSTO add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO add-in if it throws an unhandled exception while the Startup event handler is executing.
When you re-enable a soft-disabled VSTO add-in, the application immediately attempts to load the VSTO Add-in. If the problem that initially caused the application to soft disable the VSTO Add-in has not been fixed, the application will soft disable the VSTO Add-in again. See How to: Re-enable a VSTO Add-in that has been disabled for more information.
The VSTO_SUPPRESSDISPLAYALERTS Windows environment variable can be set for enabling detailed VSTO (Visual Studio Tools for Office) error messages when loading VSTO add-ins.
Related
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.
Can someone please explain to me why an Outlook Add-in(Ribbon button - visual designer) would be disabled if I do not run Outlook as an Administrator?
When running as Administrator the Add-in is visible, enabled and working fine, but when I run it without Admin on, it's visible but disabled. Thanks
Do you get any UI errors?
By default, if an VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom Ribbon does not appear, or why a Ribbon appears but no controls appear. See How to: Show Add-in User Interface Errors for more information.
Microsoft Office applications can disable VSTO Add-ins that behave unexpectedly. If an application does not load your VSTO Add-in, the application might have hard disabled or soft disabled your VSTO Add-in.
Hard disabling can occur when an VSTO 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 VSTO Add-in is executing.
Soft disabling can occur when a VSTO Add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO Add-in if it throws an unhandled exception while the Startup event handler is executing.
When you re-enable a soft-disabled VSTO Add-in, the application immediately attempts to load the VSTO Add-in. If the problem that initially caused the application to soft disable the VSTO Add-in has not been fixed, the application will soft disable the VSTO Add-in again. Read more about that in the How to: Re-enable a VSTO Add-in That Has Been Disabled article.
Also you may find the Troubleshooting COM Add-In load failures article helpful.
I have developed an outlook AddIn, I tested it and it showed up the first time and then disappeared (I assumed it was because I set LoadBehavior to 16, so I changed it to 3). Check this link for more information about LoadBehavior
Then it worked fine for me and some other people. But for some other people the Addin didn't even show up in Outlook after that, just as if it is not installed.
1-The registries are correct.
2-The loadBehavior is 3, it does not change to 2.
3-The outlook AddIn is not listed in the Active, inactive or disabled addins.
4-There is no record for it in the registry's Disabled Addins entry.
5-The only way it works is by launching the .VSTO file. The .msi installation does not enable it.
On the machine where it actually worked:
The outlook version is 2013
OS is Windows 7 x64,
.Net Framework 4.
Thi is the same configuration for the all the machines.
I also looked at Fusion Log Viewer, nothing there was related to my Addin. It's like the AddIn is not detected or not considered as an AddIn.
Any ideas why is it behaving in such a way and/or how to fix it ?
Did you have a chance to check out the COM add-ins list in Outlook. Is your add-in listed there?
If so, there can be several reasons:
Your add-in can be disabled by the host application (Outlook in your case). 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.
When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in again. Read more about that in the How to: Re-enable an Add-in That Has Been Disabled article in MSDN.
If you see your add-in in the active add-ins list - an error in the Ribbon UI. See How to: Show Add-in User Interface Errors for more information.
Finally, if you don't see the add-in listed in the COM add-ins listed you didn't register it properly in the windows registry. See the Deploying an Office Solution by Using Windows Installer article in MSDN which described all the required steps for deploying Office add-ins.
Are you sure that that your MSI file and your DLL targets Outlook's correct bitness?
You said that it worked on an x64 installation, are you sure it's compiled for both?
Haven't used much of the VSTO stuff but I think you may need to have your code shimmed.
I developed an outlook plugin using C# and Visual studio Outlook addin template, that retrieves data from databases and generates a report off of the data.
Plugin works perfectly fine on my local machine. But when I distribute the plugin as an executable to the users, it does not work on the user's machine.
Meaning the addin is not checked by default and even if I check it manually, it does not show up on outlook in the addin bar.
I am unable to figure out if its due to the certificates or anything else.Do I need to install any certificates on the users machine ?
Could some one please help me out ?
EDIT
I right click on the solution file in solution explorer and publish to a folder to generate the setup.exe . My other team mate uses the same steps with the same project checked out of perforce and publishes a setup.exe. Now, his plugin works as expected on the user's machine and mine doesnot work (mine works only on my machine). So, I am not able to figure out what the difference is. Because we both are using the same framework (4.0) and VS (VS 2010 premium).It has something to do with the my machine. not sure if I am missing any installation
Did you have a chance to check out the Trust Center settings on the problematic PC? Are the VBA macro settings applied to COM add-ins? Is the Office application configured to load only signed add-ins?
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.
When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in again.
Read more about that in the How to: Re-enable an Add-in That Has Been Disabled article.
Also you may find the Troubleshooting COM Add-In load failures article helpful.
Hope the following steps will help you solve this problem. I assume you are using Outlook 2013 or 2010.
Run the deployed setup with administration rights.
If it is not shown under Add-ins, again open the setup folder and double click on the correct .vsto file then select install.
If you can see your add-in among others, and is not functioning, it means your add-in is disabled. To enable it go to File -> Slow and Disabled Add-ins, and you should see your add-in on the pop-upped window. Enable it.
Edit:
If your plug-in is shown in Disabled Add-ins try applying the following steps:
Enable your plug-in by File -> Slow and Disabled Add-ins, and you should see your add-in on the pop-upped window. Enable it.
Right click on your add-in bar and select Customize the Ribbon.
Then on the pop-upped window, choose All Commands from the left hand side combo box. You should be able to find your command in the list box.
When you find your command click on the Add button between the lists. This will add your command to the chosen category on the right hand-side list. Then click OK.
Your command should appear under the chosen tab.
How are you deploying the add-in? You need to be sure you have configured the installations settings so when you execute the installer MS Outlook knows were to find it and all of its installations components.
In my example I am using MS Project, Visual Studio 2012 with Install Shield.
Below is an example of the registry settings I use for my add-in. You will notice I have configured the manifest to point to installation directory and points to vstolocal.
You will also need to add your .vsto file to your build when constructing the installer.
I'm a developer writing an add-in for Outlook2003/2007 using C#, Visual Studio 2005. I'm also using the COM add-in wizard (not using VSTO, I have a Connect.cs). The program successfully runs with visual studio installed on my machine but when I try to deploy the software I am getting weird behavior.
I have a logging system set up to write a few Extensibility.IDTExtensibility2 events (OnBeginShutdown, OnDisconnection, OnConnection, and OnStartupComplete) to a log file. When I run Outlook on the deployed machine my add-in does not startup up. However, when I exit Outlook I do see data in my log, but its showing that only the events OnDisconnection and OnBeginShutdown were fired. How come OnConnection and OnStartupComplete are not firing? I'm worried its a references/DLL issue but why would the other events fire and not these two?
ok i figured it out, for anyone out there who may run into this: we had our managed dll set to register for interop (in project properties)...make sure this box is unchecked! This was overriding the shim registration