tags:

views:

495

answers:

2

Using Visual C# Express On a 64 bit system (OS and machine):

I am able to set the target build platform to 32 bit platform and build my application. It runs fine on the 64 bit system. However when I run the same executable on the 32 bit system I get an error of the form "Unhandled Exception: System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

In general is this expected to not work, or do I have a dependency problem as the error implies?

Thanks,

RM

+1  A: 

Should work. But seems that your app is missing a DLL. Check your app with DependencyWalker on the target machine.

Simon Linder
Simon - tried that. Dependency walker barfed on a stack overflow in kernel32.dll (error 0xC0000409). Probably means a 64 bit DLL somewhere. Thanks all the same.
RdM
In DependencyWalker you can also see if a DLL is 32 or 64 bit.
Simon Linder
A: 

Sounds like you have a library which is not 32bit. The missing library has already been covered by the other posters, so I will say that you have a library which is a 64bit only library and when the type loader is checking to make sure it matches the signature is wrong and hence its not getting loaded.

If you could post a sample project (hello world) that exhibits the same problem (without importing 3rd party libraries) we might be able to troubleshoot further.

In your build project, make sure all libraries being built are 32bit and make sure that you are moving them all to the target machine. I prefer to wipe out the target directory and then place the files in, rather than overwrite.

GrayWizardx
I think this is it. See the output of dependency walker in Simon's post.
RdM