64bit Outlook - addin wont start - GetInterface error

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

64bit Outlook - addin wont start - GetInterface error
 
Jan Lichovník




Posts: 30
Joined: 2009-09-04
We are having troubles making addin-express load in 64bit Outlook.

By default, it fails to load because of AddinExpress.MSO.2005 is mixed mode assembly for 2.0.

If I try to force legacyV2RuntimeActivationPolicy I get this error instead:



Add-in Express Loader Log File: 11/15/2010 15:00:41

Startup directory: c:workDatovaSchrankaOutlookAddininRelease profi
Loader version: 6.2.3051.0
Operating System: Microsoft Windows 7 Ultimate Edition (build 7600), 64-bit
Process Owner: Administrator
Command Line: "C:Program FilesMicrosoft OfficeOffice14OUTLOOK.EXE" 
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): Off
------------------------------------------------------------------------
15:00:41 11880 980 Start.
15:00:41 11880 980 Reading the registry key 'HKEY_CLASSES_ROOTCLSID{77EE7AFD-187F-4A03-8488-A9E8C7BF449D}'
15:00:41 11880 980 Success. The registry key 'HKEY_CLASSES_ROOTCLSID{77EE7AFD-187F-4A03-8488-A9E8C7BF449D}' is closed.
15:00:41 11880 980 Converting the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID fr om string.
15:00:41 11880 980 Success.
15:00:41 11880 980 Attempting to get the class object by the '{4BA250A6-8BCA-46A6-982A-F340081187C3}' CLSID.
15:00:41 11880 980 Success.
15:00:41 11880 980 Creating a new instance of the add-in loader.
15:00:41 11880 980 Success.
15:00:41 11880 980 Loading the configuration from the system registry.
15:00:41 11880 980 Getting the latest CLR version.
15:00:41 11880 980 The latest CLR version is 'v4.0.30319'.
15:00:41 11880 980 The configuration has been loaded successfully.
15:00:41 11880 980     Runtime version: v2.0.50727.
15:00:41 11880 980     Assembly name: OutlookAddin, PublicKeyToken=DEBD0F3F2D38AFB4.
15:00:41 11880 980     Class name: OutlookAddin.DsModule.
15:00:41 11880 980 Attempting to create a new instance of the managed add-in class: CLR - v2.0.50727
15:00:41 11880 980 Loading CLR: v2.0.50727.
15:00:41 11880 980 Calling CLRCreateInstance method.
15:00:41 11880 980 Success.
15:00:41 11880 980 Calling GetRuntime method.
15:00:41 11880 980 Success.
15:00:41 11880 980 Calling GetInterface method.
15:00:41 11880 980 Error code: 0x80131704


Wh ere is the problem?
Posted 15 Nov, 2010 08:13:56 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Jan,

Do you use Outlook 2010 x64? Is your mixed mode assembly built for the x64 platform?
.NET, Extended MAPI, Windows Phone & RT
Posted 15 Nov, 2010 09:08:38 Top
Jan Lichovník




Posts: 30
Joined: 2009-09-04
Yes I'm using Outlook 2010 x64
My addin assembly is x86 or auto, I cannot make it for x64 because then Addin Express registrator fails with this:



Detailed technical information follows: 
---
(Inner Exception)
Date and Time:         15.11.2010 17:14:42
Machine Name:          LICHO
IP Address:            fe80::e08c:a78a:d859:f871%12
Current User:          lichodmin

Application Domain:    DefaultDomain
Assembly Codebase:     file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2005/AddinExpress.Wizard.dll
Assembly Full Name:    AddinExpress.Wizard, Version=6.2.3051.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version:      6.2.3051.2005

Exception Source:      mscorlib
Exception Type:        System.BadImageFormatException
Exception Message:     Could not load file or assembly 'OutlookAddin, Version=2.2.0.0, Culture=neutral, PublicKeyToken=debd0f3f2d38afb4' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Exception Target Site: Object reference not set to an instance of an object.

---- Stack Trace ----



(Outer Exception)
Date and Time:         15.11.2010 17:14:42
Machine Name:          LICHO
IP Address:            fe80::e08c:a78a:d859:f871%12
Current User:          lichodmin

Application Domain:    DefaultDomain
Assembly Codebase:     file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2005/AddinExpress.Wizard.dll
Assembly Full Name:    AddinExpress.Wizard, Version=6.2.3051.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version:      6.2.3051.2005

Exception Source:      AddinExpress.Wizard
Exception Type:        System.Exception
Exception Message:     The 'RegisterAssembly' function failed.
Exception Target Site: DoAfterBuild

---- Stack Trace ----
   AddinExpress.Projects.Common.Registrator.DoAfterBuild(scope As vsBuildScope, action As vsBuildAction)
       AddinExpress.Wizard.dll: N 0431 (0x1AF) IL 

Posted 15 Nov, 2010 10:26:18 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Jan,

Unfortunately there is no way to load a partially native x86-based library in the x64 process. To be sure, you can try to load your add-in in Outlook 2010 x86. Does it work in that case?

You need to recompile your mixed-mode assembly for the x64 platform.
.NET, Extended MAPI, Windows Phone & RT
Posted 15 Nov, 2010 10:38:55 Top
Jan Lichovník




Posts: 30
Joined: 2009-09-04
Yes addin works in x86 outlook 2010.

My assembly is pure managed afaik.
The mixed mode assembly is AddinExpress.MSO.2005
How can I recompile that?
Posted 15 Nov, 2010 12:35:12 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Jan,

The AddinExpress.MSO.2005.dll comes from Add-in Express package and is not a mixed-mode assembly. To load your add-in in Outlook 2010 x64 you need to set the target platform of your add-in project to the AnyCPU value and place the adxloader64.dll in the Loader folder of your project. That is all!

Is a newly created add-in project loaded in Outlook 2010 x64?
.NET, Extended MAPI, Windows Phone & RT
Posted 15 Nov, 2010 12:57:11 Top
Jan Lichovník




Posts: 30
Joined: 2009-09-04
I found what is causing this issue, it iss AddinExpress MAPI store accessor. If my project references that, it fails to load. After I removed assembly reference, addin loads :)

I hope I will be able to use some different version of MAPI accessor though, because I need its features.
Posted 15 Nov, 2010 13:15:03 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Jan,

Right! The MAPI Store Accessor is for Outlook 2010 x86 only. Currently there is no x64 edition of the component.
.NET, Extended MAPI, Windows Phone & RT
Posted 15 Nov, 2010 13:23:23 Top
Jan Lichovník




Posts: 30
Joined: 2009-09-04
Are there plans to make x64 edition of MAPI Store Accessor? If yes, is there any time estimate?

Thank you.
Posted 16 Nov, 2010 06:08:18 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Jan,

Currently we have such plans. But there is no estimation date, sorry.
.NET, Extended MAPI, Windows Phone & RT
Posted 16 Nov, 2010 06:22:01 Top