Trouble deploying to Outlook 2003

Add-in Express™ Support Service
That's what is more important than anything else

Trouble deploying to Outlook 2003
Built from VS2008 
David Kingston




Posts: 7
Joined: 2010-02-05
I followed the walkthrough for creating an Outlook addin from VS2008, selecting 2003 as the target. Did the bare minimum of adding an ExplorerCommandBar & Button as a proof of concept.

Compiled the setup and installed on my XP virtual with Outlook 2007. Installed, loaded, button worked; much joy.

I next attempted to install the addin on my XP virtual with Outlook 2003 and got the following error during installation:

Courier

So I included Microsoft.Office.Tools.Common.dll in the setup project. Recompile, install, got the following error during installation:

Courier

So I included Microsoft.VisualStudio.Tools.Applications.Runtime.dll in the setup project. Recompile, install, got through the installation. Open Outlook 2003 to find the addin is not loaded because, "A runtime error occurred during the loading of the COM addin."

So I go for broker, include all the dependencies. Recompile, install, no change.

The obvious question: shouldn't it just work? Do I still need to address the security issue as if I'd built the addin from scratch without using ADX?

Makes sense that I'd have to include the dependencies, since we're not making use of 2003 PIA, but if I am required to include the dependencies, I'd have expected them to be included in the setup project that was created by the ADX tool. Are the dependencies required when deploying to 2003?

VSTO 3.0 and .NET 3.5 are installed on the machine.
Posted 05 Feb, 2010 11:21:51 Top
David Kingston




Posts: 7
Joined: 2010-02-05
I'm using Add-in Express 2009 for VSTO, Premium. Built in Visual Studio 2008 Professional on Windows Vista Ultimate sp2. Attempted to install in Outlook 2003 on Windows XP sp3.
Posted 09 Feb, 2010 12:21:16 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
Hi David,

I've just created an empty VSTO add-in targeting Outlook 2003 using the ADX for VSTO Add-in template in the New Project dialog of VS 2008, built the setup project and installed it on Windows XP SP3 + Office 2003 SP 3 with no problems.

Did you run setup.exe when running the installer? Note that it unpacks and installs prerequisites required for your add-in to be installed on a clean system.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Feb, 2010 12:51:23 Top
David Kingston




Posts: 7
Joined: 2010-02-05
I just successfully installed and loaded my addin on a different machine. Apparently that first system wasn't as clean as I thought.

I'll be creating a new Windows XP / Outlook 2003 virtual machine tonight for testing duties. Lesson learned!

Thanks, Andrei.

And kudos on this product. Wish I'd had it about 2 years ago when we developed the first version of our Outlook addin.
Posted 09 Feb, 2010 13:56:10 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
Thnak you, David!


Andrei Smolin
Add-in Express Team Leader
Posted 09 Feb, 2010 14:41:40 Top
David Kingston




Posts: 7
Joined: 2010-02-05
So now I'm testing on my shiny new virtual -- Windows XP sp3, Office 2003 Professional sp3, fully updated. Same behavior I was originally seeing.

Here's the exact process I followed:

  • Created a new project targetting for VB & Outlook 2003 with "Generate the setup project." checked.
  • Turned off Option Strict. (To clear the implicit conversion error in the ADXModule.OutlookApp property.)
  • Note: I consistently get a warning, "The generated files could not be loaded and have been recreated." Not sure if that's significant.
  • Switch to "Release" mode.
  • Set VSTO 3.0 as a prerequisite on the stup project. (Not checked in Release mode for some reason.)
  • Right-click the setup and Build.
  • Copy setup & msi to the new virtual and execute setup.
  • EULA for .NET 3.5 & VSTO.
  • .NET 3.5 & VSTO 3.0 install.
  • Addin install then encounters the same errors as my original post, starting with the missing Microsoft.Office.Tools.Common.dll


The references to Microsoft.Office.Tools.Common.dll, Microsoft.Office.Tools.Outlook.dll and Microsoft.VisualStudio.Tools.Applications.Runtime.dll in my setup project are all referencing version 8.0, but the target machine has a full set of 9.0 objects in the GAC. Should the setup project be referencing 9.0 objects, or should the 8.0 be on the target machine? If 8.0 should be on the target machine, how should they get there?
Posted 12 Feb, 2010 09:25:28 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
Hi David,

David Kingston writes:
The references to Microsoft.Office.Tools.Common.dll, Microsoft.Office.Tools.Outlook.dll and Microsoft.VisualStudio.Tools.Applications.Runtime.dll in my setup project are all referencing version 8.0, but the target machine has a full set of 9.0 objects in the GAC


That is our bug: the VSTO 3.0 entry in prerequisites must be unchecked in this case.

David Kingston writes:
If 8.0 should be on the target machine, how should they get there?


In order to add VSTO 2005 SE runtime to the Prerequisites dialog of your setup project, you need to do the following:
- download http://www. add-in-express.com/files/projects_pub/as/VSTOSERuntime_package.zip
- unpack it to {Program Files}\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\VSTOSERuntime\ (create that folder)
- download vstor.exe from http://www.microsoft.com/downloads/details.aspx?FamilyId=8315654B-A5AE-4108-B7FC-186402563F2B&displaylang=en and place it to the same folder

Now, open the Prerequisites dialog and select "Microsoft Visual Studio 2005 Tools for Office Second Edition runtime".

Please let me know if this helps.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Feb, 2010 11:20:22 Top
David Kingston




Posts: 7
Joined: 2010-02-05
Making progress! That solved my missing files issues. Target machine now has all the 8.0 objects installed. Addin installs successfully, but in the "COM Add-Ins" dialog I get the generic "Not loaded. A runtime error occurred during the loading of the COM addin." message.

So I've got my prereqs installed, adxregaddin.exe handles the security...I'm at a loss.

Is there someplace those Outlook load errors getted logged? I see nothing in the event logs.
Posted 12 Feb, 2010 13:18:35 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
Hi David,

Please make sure the folder in which you installed the add-in has FullTrust. See Control Panel | Administrative Tools | Microsoft .NET Framework 2.0 Configuration.

Also, I'd suggest diabling all Outlook add-ins: set LoadBehavior = 0 in {HKLM and HKCU}\Software\Microsoft\Office\Outlook\Addins\{an add-in}.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Feb, 2010 11:06:24 Top
David Kingston




Posts: 7
Joined: 2010-02-05
I had to install the .net 2.0 SDK to get the Framework Configuration tool on my test machine, but yes, it does appear to have the proper security configured.

I have no other add-ins installed on the test machine.

Same beh * avior: no errors during install, but the add-in won't load. Any way I can send you my uncompiled test solution or you can send me yours?
Posted 02 Mar, 2010 13:43:48 Top