Manage COM Add-ins dialog fails to make an installed Outlook add-in ACTIVE on target machine - deployment

My add-in targets Outlook 2007 and was built using C# with Visual Studio 2010. I have run into problems deploying this to different target machines by means of the SETUP.exe and "manifest" built by the Publish Wizard of Visual Studio.
My latest attempt to get this deployed to a target PC (i.e. one typical of other users where this will be deployed and lacking my development environment) gives strange problems:
the add-in installs OK (i.e. Setup had no complaints; program appears properly in Control Panel)
visiting Tools -> Trust Center -> Add-ins shows that my just-installed add-in is Inactive
clicking Go.. for the Manage COM Add-ins dialog & checking the box for mine then the Add.. button fails
a window looking like a browse dialog box titled "Add Add-in" comes up with "No items match your search" in the right-hand pane; at the bottom of this window is an empty textbox labeled "File name:" and a choice of "Executable Files" or "All files" for a file type. The add-in remains "inactive".
It is not clear to me what this dialog needs at this point to make it "active" (Load at Startup was part of the choices here).
NOTE:
The 2 projects in this solution were compiled for a "target framework" of .Net 3.5 resulting in references to DLLs such as Microsoft.Office.Tools.Outlook.V9.0 and his companions (I guess that is "VSTO 3.0 ??).
This solution launches Outlook properly on the development PC and the add-in is loaded successfully and runs as expected (against Outlook 2007 and/or Outlook 2010); so this seems related to deployement only.
Could there be a bug in the stuff built by the Setup wizard that comes with Visual Studio 2010? I read somewhere that the "manifest" can be "corrupt".
EDIT-UPDATE 3/31/2011:
I think I found the answer. I believe by using the "Publish Wizard" in VStudio which produces a SETUP.EXE, I was trying what is called "ClickOnce" deployment. Secondly, this addin for Outlook is NOT a "document level" addin but instead a "machine level" addin. Given these discoveries of better terminology, I found this at http://msdn.microsoft.com/en-us/vsto/ff937654.aspx:
"You can use ClickOnce to create and install self-updating applications with minimal user interaction. This has an automated mechanism for easily distributing updates to your application. However, ClickOnce is not capable of deploying components that require administrative privilege such as machine level add-ins. For solutions that require administrative privilege you can use Windows Installer to deploy a Visual Studio Tools for Office customization."
So, I will try to make a Windows Installer. Any confirmation would be appreciated.

I am confident the ClickOnce style of deployment will NOT work for my machine level add-in for Outlook 2007. Therefore, I am answering my own question by stating only that this requires a Windows installer (and setup) that can built with the properly chosen Visual Studio template.
The sad news is that in my testing of said installer .msi and associated setup.exe for the pre-requisites the install to my target machine went well but when I test the operation of the addin itself inside Outlook I get a terrible APPCRASH event in Outlook.exe:
Problem signature:
Problem Event Name: APPCRASH
Application Name: OUTLOOK.EXE
Application Version: 12.0.6550.5003
Application Timestamp: 4d10fbc4
Fault Module Name: kernel32.dll
Fault Module Version: 6.0.6001.18215
Fault Module Timestamp: 49953395
Exception Code: e0434352
Exception Offset: 000442eb
OS Version: 6.0.6001.2.1.0.256.1
Locale ID: 1033
Additional information about the problem:
LCID: 1033
Brand: Office12Crash
skulcid: 1033
So the answer is that ClickOnce is not appropriate. The .msi appears to properly install the add-in but at runtime it blows sky high. Remember the addin works properly at runtime when launched via Visual Studio. Why does deployment have to be so damned difficult?

Related

Microsoft word add in error VSTO

We have a Microsoft word add-in that is working fine on the majority of pc's.
On a particular windows 7 pc, it has the visual studio 2010 tools for office installed correctly.
But when a user creates a new template word document, they get teh following error:
The customization assembly could not be found or could not be loaded.
You can still edit and save the document. Contact your administrator
or the author of this document for further assistance.
We have tried unloading all dependencies but still does not make any difference.
This is an issue effecting a small amount of windows 7 pc's with office 2016 installed. It seems to be pc related rather than the application.
Usually, the reason behind such an error is that the permissions for loading the VSTO solution are missing. One thing that often gets "missed" when deploying VSTO solutions is that the document must be in a "trusted location". You might want to check that this is the case by looking in the Word "Trust Center" (in the Options). You also need to be sure you've installed the correct version of the VSTO run-time for the version of Windows and Office. Read more about that in the Troubleshooting Run Time Errors in Office Solutions article.
Also it may indicate that you didn't include all required dependencies to your add-in's installer (any platform-specific assemblies). Something is missing on the target machines, so I'd suggest looking for any difference between machines. You can add the .NET Framework, the Visual Studio Tools for Office runtime, and the Office primary interop assemblies to your Setup package as prerequisites that are deployed with your Office solution. For information about how to install the primary interop assemblies, see Configuring a Computer to Develop Office Solutions and How to: Install Office Primary Interop Assemblies.
The required steps for deploying Office solutions are described in the following articles:
Deploying an Office Solution by Using ClickOnce
Deploying an Office Solution by Using Windows Installer
You can use the event viewer in Windows to see error messages that are captured by the Visual Studio Tools for Office runtime when you install or uninstall Office solutions. You can use these messages from the event logger to resolve installation and deployment problems. For more information, see Event Logging for Office Solutions.
See Troubleshooting Office Solution Deployment for more information.

VSTO Outlook Add-in referencing external libraries fails

I'm working on a VSTO add-in for Outlook, versions 2007-2013and minimum .Net version is 4.0. In my project I have a couple of referenced libraries. When I deploy the add-in via MSI (built via Wix) the add-in itself is loaded into Outlook but, the referenced libraries are not available.
It works fine on my development machine so I'm assuming it is a trust issue of some sort. I am uncertain as to what needs done to have the included libraries themselves be trusted. Any help is appreciated.
Are you using VS setup project for addin deployment? If so, you might want to try
Right-click setup project icon => Add => Assembly...
to add your external libraries.
Regarding the trust issue, please take a look at these articles on MSDN. Inclusion list might also be helpful in your case.
Also, to test deployment on your development machine, I'd suggest you clean your project/solution first
Right-click Project/Solution icon in Solution Explorer => Clean
then deploy and install your addin onto your machine.

Problems deploying a WinForms app that uses Microsoft ReportViewer

I have published a WinForms application from Visual Studio 2010. It uses .NET 4.0. in the prerequisite dialog in Publish pane I selected .NET 4.0 Client Profile and Windows Installer 3.0. After publishing application to disk, I migrated it to client's computer which first installed .NET Client Profile and after reboot it gave following error message:
Unable to Install or run application. The application requires that assembly, Microsoft.ReportViewer.Common version 10.0.0 in global assembly cache first.
After this message the installation process exits. I'm using .NET's report in my project (not Crystal Reports).
You have to deploy the ReportViewer controls separately.
Check here on MSDN for more information: Deploying Reports and ReportViewer Controls
The ReportViewer control redistributable is a self-extracting file named ReportViewer.exe that includes an .msi and other files. You can find ReportViewer.exe at the following location:
%PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.exe
You can also download it from the Microsoft Download Center.
[ . . . ]
The type of control you are using
determines where ReportViewer.exe
should be run.
For ASP.NET applications, run
ReportViewer.exe on the Web server
that hosts your application. This must
be done by a server administrator.
For Windows Forms applications,
include the controls as an application
prerequisite so that they are
installed automatically with your
application. You can use the
bootstrapping application to automate
this step:
Open the project properties page.
Click Publish, and then click
Prerequisites.
Select Microsoft Visual Studio 2010
Report Viewer, and then click OK.
Publish the application.
During application installation, a
check is performed on the local
computer to see if ReportViewer is
already installed. If it is not
installed, the Setup program will
install it.
I guess this is probably a new VS2012 feature, but you now can deploy Report Viewer (and the SQL Server CLR Types) with Forms / WPF click once installations.
Open the project properties page.
Click the Publish tab, and then click the Prerequisites button.
Select Microsoft Visual Studio 2012 Report Viewer, and SQL Server
CLR Types then click OK.
Make sure that the Download prerequisites from the component
vendor’s website option is checked. This is the only supported
option. Then, click OK.
Click the Options button.
In the Deployment tab, specify a deployment Web page and select the
Automatically generate deployment web page after ever publish
checkbox.
Click OK and publish the application.
look at this: Running ReportViewer.exe
both we are gave you same link. it will help you
Download and install Microsoft Report Viewer 2012 Runtime CTP from following url...
http://www.microsoft.com/en-in/download/details.aspx?id=27230
I had same problem but it solved after install the above...
Thanks...
I had the same problem for months, one machine cat v.11 installed (manually by adding some components) and another had v.10 (from the ms framework itself), when I did the publish from my machine, it gave the error.
here is how I fixed it,
In Nuget, there are 2 packages,
Microsoft.ReportViewer.Windows (Microsoft.ReportViewer runtime 2012) and
ReportViewer.Common 10.0
I installed them both, now its working quite all right
Open project properties Alt+Enter.
Click on publish tab.
Click on prerequisites select Microsoft visual studio report viewer.
visit this website for more detail
https://msdn.microsoft.com/en-us/library/ms251723.aspx

Setup project slow to install Windows service and client

I am currently using the Visual Studio 2010 Setup Project to deploy my application to an MSI installer file, which includes a Windows Service and a Windows Forms application. But I am disappointed with the performance and compatibility of this form of packaging.
My application is compatible with Windows XP and upwards, but several older XP user-testing boxes simply don't have the right version of the Windows Installer or the necessary service pack installed. (Un)installation can take dreadfully long for a program under 1MB in size and many systems do not support it. InstallState errors can crop up and ruin the (un)installation if the service has been deleted or already installed, or if any program files are missing (for uninstall).
What I need from an (un)installer:
Manage .NET dependencies.
Copy/remove my application files to a folder.
Add/remove menu and shortcuts to the desktop and Start menu.
(Un)install a Windows service, though I can also do this from my application. The stop and uninstall part is important.
Run my application when it's done.
This question's answers recommend NSIS (which I have used with good results) and WiX. Ironically there is no easy link to simple installer for WiX on their website.
Am I missing something with VS2010's setup project? It is optimized for speed, but it's just too slow.
You should run the installer/uninstaller explicitly with
msiexec /x thefile.msi /l*v thefile.log
(/i for install). Then inspect the log file; it will have time stamps telling you what action took what amount of time. Of course, the logging will affect that, but you should get an idea what makes it take so long.

What are reasons for Outlook 2007 to not load CLR 4 with installed VSTO 2010 and a registered managed application level add-in targeting .net 4?

I have developed an application level add-in for Outlook targeting Outlook 2010 and .NET 4 and I want to run it on Outlook 2007, which should not be a problem due to the new "no pia" feature of .NET 4 (see this blog post).
However, after deploying the add-in with my Windows Installer package (the same package works for Outlook 2010), the add-in does not get loaded correctly and its load behavior is set to 2.
The test machine has the following software installed (in the given order):
Microsoft Windows XP with Service Pack 2 (x86)
Microsoft Office 2007 Enterprise
Windows Installer 3.1
Microsoft Windows XP Service Pack 3 (x86)
Microsoft .NET Framework 4.0 (Extended)
Microsoft Visual Studio 2010 Tools for Office Runtime (x86)
The utility assemblies are included in my deployment location and the add-in is registered correctly (shows up in Outlook trust center and deployment manifest is also included). I do not reference any third party libraries.
The strange thing is that the CLR 4 is not even loaded into Outlook, which I can see through the Visual Studio 2010 Remote Debugger. When I create an test add-in on my development machine and throw an exception on add-in startup, the load behavior also gets set to 2 on startup (without debugging), but at least the CLR 4 gets loaded into the Outlook process. Has anyone ideas what (probably missing dependency) could cause the VSTO 2010 Runtime to not load .NET Framework 4? I have also tried reinstalling VSTO which caused no effect.
Best Regards,
Oliver Hanappi
I found the solution on the msdn forums. There is a problem when no clr 2 is installed. A hotfix is required in this case. For more details see http://social.msdn.microsoft.com/Forums/en/vsto/thread/d95cc828-fdb9-4622-bf09-291a25cea81b.