Mixed mode assembly is built against version 'v1.1.4322' of the runtime

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

Mixed mode assembly is built against version 'v1.1.4322' of the runtime
 
Vladislav Safronov




Posts: 31
Joined: 2009-07-06
I've just upgraded to the latest version 6.1.3044.2005 (from 6.0.3033.x).

But now I constantly get "Exception Message: Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information." error during ADX registration process as shown below.

None of my assemblies are using CLR 4.0.

I wonder if it is a known issue, and/or if there is a way to instruct ADX Registrator to use CLR v2.x instead of CLR v4.0? Thank you in advance.



Add-in Express Registrator Log File: 08/30/2010 17:58:03

Installation directory: C:\Program Files\yyy\xxx\
Registrator version: 6.1.3044.0
-------------------------------
17:58:03 Starting the add-in registration process.
17:58:03 Loading mscoree.dll
17:58:03 Success.
17:58:03 .NET Framework installation directory:
17:58:03 The latest version of .NET Framework: 'v4.0.30319'
17:58:03 Loading CLR: v4.0.30319.
17:58:03 Calling CLRCreateInstance method.
17:58:03 Success.
17:58:03 Calling GetRuntime method.
17:58:03 Success.
17:58:03 Calling GetInterface method.
17:58:03 Calling GetInterface method for the CorRuntimeHost interface.
17:58:03 Success.
17:58:03 Starting CLR...
17:58:03 Success.
17:58:03 The CLR v4.0.30319 has been initialized successfully.
17:58:03 Creating a new domain setup.
17:58:03 Success.
17:58:03 Getting the add-in directory.
17:58:03 Success. The directory is 'C:\Program Files\yyy\xxx\'
17:58:03 The configuration file is '(null)'
17:58:03 The 'shadow copy' is disabled.
17:58:03 Creating a new application domain.
17:58:03 Success.
17:58:03 Getting the base directory for the domain.
17:58:03 Success. The directory is 'C:\Program Files\yyy\xxx\'.
17:58:03 Searching for the Add-in Express core library.
17:58:03 Success. The 'AddinExpress.MSO.2005.dll' file is found.
17:58:03 Creating an instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
17:58:03 Assembly identity is 'AddinExpress.MSO.2005'.
17:58:03 Success.
17:58:03 Unwrapping the instance of the 'AddinExpress.Deployment.ADXRegistrator' class.
17:58:03 Success.
17:58:03 Calling the managed registration procedure.
17:58:04 Managed Error:
Date and Time: 30-08-2010 17:58:04
Machine Name: ABC
IP Address: fe80::a8a3:3ec3:5b04:b457%11
Current User: QWE\QWERTY

Application Domain: C:\Program Files\yyy\xxx\
Assembly Codebase: file:///C:/Windows/assembly/GAC_MSIL/AddinExpress.MSO.2005/6.1.3044.2005__4416dd98f0861965/AddinExpress.MSO.2005.dll
Assembly Full Name: AddinExpress.MSO.2005, Version=6.1.3044.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 6.1.3044.2005
Assembly Build Date: 02-05-2008 02:06:50

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

---- Stack Trace ----
System.Reflection.RuntimeAssembly.GetExportedTypes(assembly As RuntimeAssembly, retTypes As ObjectHandleOnStack)
AddinExpress.MSO.2005.dll: N 00000 (0x0) JIT
System.Reflection.RuntimeAssembly.GetExportedTypes()
AddinExpress.MSO.2005.dll: N 0000 (0x0) IL
AddinExpress.Projects.Common.Utilities.GetRegistrableTypesInAssembly(assembly As Assembly)
AddinExpress.MSO.2005.dll: N 0006 (0x6) IL
AddinExpress.Projects.Common.Utilities.RegisterAssembly(assembly As Assembly, createVersionKey As Boolean, allUsers As Boolean, targetHive As ADXTargetRegistryHive, callRegMethod As Boolean)
AddinExpress.MSO.2005.dll: N 0000 (0x0) IL
AddinExpress.Deployment.AddinDomainAdapter.RegisterForComInterop(register As Boolean, dllType As String, dllPath As String, showExceptions As Boolean)
AddinExpress.MSO.2005.dll: N 0055 (0x37) IL
AddinExpress.Deployment.ADXRegistrator.RegisterAssembly(commandLine As String)
AddinExpress.MSO.2005.dll: N 0437 (0x1B5) IL



17:58:04 The add-in registration process is completed with HRESULT = -2147467259.
Posted 30 Aug, 2010 11:21:13 Top
Eugene Astafiev


Guest


Hi Vladislav,

Nope. The adxloader.dll always uses the most recent version of the .net framework.

Please take a look at the following http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/5d1186ec-ad55-4929-b1e4-8806cdc758af. It looks like 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, for Outlook 2007, 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>

Please let me know whether it works for you.
Posted 30 Aug, 2010 12:12:07 Top
Vladislav Safronov




Posts: 31
Joined: 2009-07-06
Eugene,

Thank you.

I tried, but it does not seem to help. I may try again with a fresh mind tomorrow, though.

Also, the error occurs during the setup process, when no Outlook is running at all, so I wonder how could Outlook.exe.config help. I believe there is no host application at that point running yet, or...?

But the thing that confuses me is that the problem introduced itself only with the latest Add-in Express build, 6.1.3044.2005.
Previous version, 6.0.3033.x, worked fine in the same environment.

So I wonder if there were relevant changes in version 6.1.3044.2005, or is it just me who coincidentally changed something along with the upgrade?
Posted 30 Aug, 2010 12:59:02 Top
Vladislav Safronov




Posts: 31
Joined: 2009-07-06
So far I had to roll back to version 6.0.3033.x.
It does not exhibit that problem...
Posted 31 Aug, 2010 08:18:53 Top
Eugene Astafiev


Guest


Hi Vladislav,

So I wonder if there were relevant changes in version 6.1.3044.2005, or is it just me who coincidentally changed something along with the upgrade?


No, there weren't any relevant changes since 6.0. Please try moving initialization of your .net 1.1 based components from the add-in module ctor to the AddinInitialize event handler.
Posted 01 Sep, 2010 08:06:04 Top