I have upgraded a C# console app to .NET 4.5.1. In the process, I removed all external library references and re-added new references to .NET 4.x versions of the DLLs.
The new 4.5.1 console app works properly on my development server, and I have tested it on 5 other machines, where it works fine as well.
However, when I deploy it to my client's workstation, it crashes immediately with this error:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'myapp.exe' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
I have checked that the client workstation has .NET 4.5.x installed (it shows version 4.5.2 in the registry (release 379893), and I've triple checked my DLL references. My guess is that some DLL is different on the client machine.
As a test, I tried it on a second client workstation, and the same error occurred. The second workstation was built by the same IT guy using the same files / installs, so we didn't get any new clues, but it tells me that the issue is not a random workstation-specific issue.
Rather than troubleshoot indirectly by guessing and trial and error, is there a tool to identify which DLL is causing this error?
Will Sysinternals Process Monitor or some other tool be able to identify the culprit?