Error trying to use MAPI Store Accessor

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

Error trying to use MAPI Store Accessor
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information 
RikardG




Posts: 95
Joined: 2009-10-19
Hi,

I'm developing an Outlook addin with Visual Studio 2010 and Addin express for .net 2009 running Outlook 2007. My addin does use the adxloader (version 5.2.2027.0), is version neutral and targets the .Net framework 4.

Referencing the AddinExpress.MAPI.dll and trying to use the "AddinExpress.MAPI.ADXMAPIStoreAccessor" makes the add-in express error dialog pop up when starting Outlook with the following exception:

"(Inner Exception)
Date and Time: 2010-06-24 10:33:22
Machine Name: GOTJANNIK7
IP Address: fe80::717d:4303:180d:7bf%11
Current User: SUPEROFFICE_ASA\jannik

Application Domain: C:\Source\Lekstuga\JanniK\AddinExpress\VersionNeutralAddin\VersionNeutralAddin\bin\Debug\
Assembly Codebase: file:///C:/Windows/assembly/GAC_MSIL/AddinExpress.MSO.2005/5.2.2024.2005__4416dd98f0861965/AddinExpress.MSO.2005.dll
Assembly Full Name: AddinExpress.MSO.2005, Version=5.2.2024.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 5.2.2024.2005
Assembly Build Date: 2005-07-17 02:06:50

Exception Source: VersionNeutralAddin
Exception Type: System.IO.FileLoadException
Exception Message: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
Exception Target Site: AddinModule_AddinInitialize

---- Stack Trace ----
VersionNeutralAddin.AddinModule.AddinModule_AddinInitialize(sender As Object, e As EventArgs)
AddinModule.vb: line 0212, col 05
AddinExpress.MSO.ADXAddinModule.Extensibility.IDTExtensibility2.OnStartupComplete(custom As Array&)
AddinExpress.MSO.2005.dll: N 5087 (0x13DF) IL"

I found the following link: http://www.marklio.com/marklio/PermaLink,guid,ecc34c3c-be44-4422-86b7-900900e451f9.aspx with no luck to solve the problem. Can you please tell me what this is about?
Posted 24 Jun, 2010 04:22:49 Top
Eugene Astafiev


Add-in Express team


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

The MAPI Store Accessor component needs to be rebuilt against .net framework 4.0. I will research that issue in a few days because I am in hospital now. Thank you for poiting this to me.
.NET, Extended MAPI, Windows Phone & RT
Posted 24 Jun, 2010 06:24:26 Top
Eugene Astafiev


Add-in Express team


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

Sorry for the delay. Today is my first full working day after a rest in hospital ;-) I have investigated the issue you described. You need to create a config file (or modify an existing one) for the host application (Outlook in your case). Name it Outlook.exe.config and place it in the same folder where Outlook.exe resides. Typically, it is the C:\Program Files\Microsoft Office\Office12 folder. Please use the following content for the config file:

<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>

Above I described a small workaround. Later I will re-build the entire component for .net framework 4.0.
.NET, Extended MAPI, Windows Phone & RT
Posted 01 Jul, 2010 07:30:08 Top
mat3




Posts: 15
Joined: 2010-05-06
Hi Eugene,
Hope you are feeling better. Did you get a chance to rebuild the entire component for .net framework 4.0? We are not able to target Outlook 2010 x32 and x64 because of this issue.
Regards

Matt
Posted 18 Jul, 2010 01:40:58 Top
Eugene Astafiev


Add-in Express team


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

I will prepare a new build of the MAPI Store Accessor next week. Currently I am busy with Add-in Express.
.NET, Extended MAPI, Windows Phone & RT
Posted 21 Jul, 2010 05:30:53 Top
mat3




Posts: 15
Joined: 2010-05-06
Thanks Eugene. We are looking forward to that so that we can support Outlook 2010 x86 and x64
Regards

Matt
Posted 21 Jul, 2010 15:57:40 Top
Connie Koch




Posts: 3
Joined: 2010-07-21
We are very happy to hear that x64 compatible MAPI Store Accessor is on the way. We need it urgenly as well!
Posted 21 Jul, 2010 18:24:12 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello guys,

I just want to clarify myself :D I am going to rebuild the entire component for the .net framework 4.0 next week (not x64 version).
.NET, Extended MAPI, Windows Phone & RT
Posted 22 Jul, 2010 04:19:05 Top
C K




Posts: 3
Joined: 2010-07-21
To make sure I am understanding then, does that mean that there will not be a x64 compatible MAPI Store Accessor at some date in the future?
Posted 22 Jul, 2010 12:18:50 Top
Andrei Smolin


Add-in Express team


Posts: 14094
Joined: 2006-05-11
I don't think the 64-bit version of the MAPI Store Accessor will arrive within the next 2 months.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jul, 2010 12:30:26 Top