I have built an assembly using MATLAB Builder for .NET on a 32-bit machine. This assembly is being used by a C# application that is being built on a 64-bit machine. The application has the MATLAB Builder for .NET generated assembly referenced, and builds correctly. However, the following error is thrown at runtime:
System.BadImageFormatException was unhandled Message="Could not load file or assembly 'MWArray, Version=2.0.0.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f' or one of its dependencies. An attempt was made to load a program with an incorrect format." Source="MatLabConsoleApplication" FileName="MWArray, Version=2.0.0.0, Culture=neutral, PublicKeyToken=e1d84a0da19db86f"
Best Answer