c# - AnyCpu reference x64 valid? -
is valid scenario reference x64-dll anycpu dll when system run on sure 64bit system?
i'm asking, because had issues here, getting exception follows:
"could not load file or assembly 'xy' or 1 of dependencies.an attempt made load program incorrect format"
i had problem several times different solutions in last couple of years. seems work , not.
it valid anycpu
assembly target x64 dll. but, ensure anycpu
assembly executing x64 process.
note later versions of visual studio have added "prefer 32-bit" option assemblies. need make sure turned off, , aren't using settings on machine override setting.
also note if anycpu
assembly references other assemblies may available x86 assemblies on target machine, run x86 process.
frankly, if know want process ever run x64, imho makes sense compile x64
. @ least way, if wind running in incompatible environment, you'll better error message (i.e. event log contain information dependency incompatible process, instead of other dependency expected).
Comments
Post a Comment