0
votes

I compiled the whole project with x86 platform target. It is working fine when I copy .exe and the reference dlls on to the server and run .exe from server cmd window.

Our requirement is to copy the exe and dlls onto some network path and execute the exe on the server using UNC path. When I execute using UNC path, I am getting the error:

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'XXXX, Version=3.0.10.19399, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'XXXX, Version=3.0.10.19399, Culture=neutral, PublicKeyToken=null'

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Can someone help?

1
What happens when you enable Assembly Bind logging as the message suggests? - Dai

1 Answers

0
votes

I'm just guessing now, but I would probably blame the path itself - it's most likely "untrusted", reason unknown. Enable Assembly Bind Logging (tip: google :) ) to figure out what's happening