PM Error: MIPPluginLoad (RookArchive.dll):Exception source: mscorlib

We have a plugin which works fine in Professional+ and are now trying to load it into Professional. We added to the [C:\Program](file:C:/Program) Files (x86)\Milestone\Milestone Surveillance\MIPPlugins\ folder

However our plugin does not get loaded.

2019-04-26 4:20:58 PM Error: MIPPluginLoad (RookArchive.dll):Exception source: mscorlib

Exception type: System.BadImageFormatException

Exception message: Could not load file or assembly ‘file:///[C:\Program](file:C:/Program) Files (x86)\Milestone\Milestone Surveillance\MIPPlugins\StorageQuest RookArchive\RookArchive.dll’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

Exception target site: _nLoad

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)

at System.Reflection.Assembly.LoadFrom(String assemblyFile)

at VideoOS.Platform.Util.PluginManager.FindPlugins(String fileName, Type typeToLoad)

at VideoOS.Administrator.Platform.XPEEnvironmentManager.Log(String name, Boolean error, String where, String text, Object[] args)

at VideoOS.Administrator.Platform.XPEEnvironmentManager.ExceptionHandler(String name, String where, Exception exception)

at VideoOS.Platform.Util.PluginManager.FindPlugins(String fileName, Type typeToLoad)

at VideoOS.Platform.Util.PluginManager.LoadFromFolder(String folderPath, Type pluginInterfaceType, String pluginDefName)

at VideoOS.Platform.Util.PluginManager.LoadFromFolder(String folderPath, Type pluginInterfaceType, String pluginDefName)

at VideoOS.Platform.Util.PluginManager.Initialize()

at VideoOS.Administrator.Platform.PlatformPlugin.InitializePlugin(IPluginServer server)

at VideoOS.Administrator.PluginUtilities10.BasePlugin.VideoOS.Administrator.PluginInterfaces.IPlugin.InitializePlugin(IPluginServer server)

at VideoOS.Administrator.Framework.Plugins.PluginManager.InitializePlugins()

at VideoOS.Administrator.Framework.Plugins.PluginManager.LoadPlugins()

at VideoOS.Administrator.Application.Program.Main(String[] Args)

Exception type: System .BadImageFormatException

This means that you are attempting to run 64 bit code in a 32 bit environment. This does also make sense given the scenario: The management application in XProtect e-code is still 32 bit (while the Management Client in c-code is 64 bit). You will have to build it as 32 bit. I say it makes sense but I am unsure because most often you will build the .net dll for a plugin as AnyCPU.

Perhaps you can use this as a hint and it will lead you to the solution, if it does not lead you to a solution please ask again..

Thanks.

We built the 32 bit version with the 32bit dlls required by our solution. However, is there a 32 bit version of VideoOS.Platform.SDK.Export.dll?

System.BadImageFormatException: Could not load file or assembly 'VideoOS.Platform.SDK.Export,

Please see - https://developer.milestonesys.com/s/article/Processor-architecture-compatibility-for-the-Milestone-Integration-Platform-MIP-SDK