Symptom
The following error occurs when using Analysis for Office:
"Mixed mode assembly is built against version 'v2.x.xxxxx' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information"
Environment
SAP BusinessObjects Analysis, edition for Microsoft Office
Cause
The issue might be related to the pluginwrapper.dll.
AO 2.x is based on Microsoft .NET 4.0.
Some other tools are based on Microsoft .NET 2.0.
AO installs the pluginwrapper to a local installation folder.
Some other tools install their pluginwrapper to the global assembly cache (GAC).
When loading an assembly, .NET checks the GAC first.
If the assembly is found in the GAC, it is loaded. It is not possible to force .NET to load a local file instead.
The error message described in this note occurs because when AO wants to load the pluginwrapper, .NET provides the pluginwrapper version from the GAC, even with a different .NET version. But when loading a .NET 2.0 assembly from a .NET 4.0 assembly, we run into this "mixed mode assembly" exception.
Resolution
The recommendation is to manually install the pluginwrapper of AO to the global assembly cache (GAC) by following the steps below:
- Make sure to have the Windows tool gacutil installed. This tool is part of the Microsoft Windows SDK for your Windows version:
- Win 7 - https://www.microsoft.com/en-us/download/details.aspx?id=8279
- Win 10 - https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
- In a command prompt with administrator rights, go to the installation folder of the Analysis Office plugin, where the pluginwrapper.dll of AO is located. Then install this pluginwrapper.dll with the command below:
gacutil /i pluginwrapper.dll - Start AO again and retest the scenario.
Keywords
mixed, assembly, mode, gac, assemblies, error , KBA , BI-RA-AO-XLA , Excel Addin , Problem