System.BadImageFormatException: Could not load file or assembly Options

codeling Posts: 1054 Points: 4431
Posted: Wednesday, September 20, 2017 9:59:10 AM

When you try to install a Window service in 64-bit by using InstallUtil.exe in the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319, most likely you will encouter the following error:

Exception occurred while initializing the installation: System.BadImageFormatException: Could not load file or assembly 'file:///xxxxxxx' or one of its dependencies. An attempt was ma de to load a program with an incorrect format..

The reason is because you are using the 32-bit version of the tool to install a 64-bit architecture application. you should look for the 64-bit version of InstallUtil.exe here:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319
 
Users browsing this topic
Guest