I have created an installer with Visual Studio 2008. VS project type is deployment project. This installer fails in some environments but also runs perfectly in some other environments.
For example, the installer is compiled in virtual machine that runs Windows Server 2012 R2 Standard. Of course installation succeeds there. How ever, it fails in other virtual machine running same Windows edition.
The error message is: "Error 1001. Exception occurred while initializing the installation: System.BadImageFormatException: Could not load file or assembly 'file: Custom actions.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."
Target framework is 3.5 in all applications in the installer solution. Also the references in Custom Actions library have .NET version 2.0 or 3.5.
What is missing in the failing environment? Where to start the search?