问题
We have a project in our application that builds in a 32bit or a 64bit version of a dll depending on the processor architecture on the machine that it is built on, to facilitate testing.
I can likely predict the dll that will be used on a given machine, but we have several devs, some with 64bit machines, some with 32bit machines, and I want to be able to check if builds they put to the live server have gone up with the 32bit version of the dll or the 64bit version of the dll.
Checking properties of a dll doesn't give you this sort of information. Is there a way of getting it?
Thanks
回答1:
I'm not sure if there is any way you can see wether or not the assembly was compiled for x64 / x86. You can use corflags to specify though. msdn page
Also you coulduse this from code: Module.GetPEKind Method
来源:https://stackoverflow.com/questions/4947480/net-how-can-i-tell-if-a-dll-is-a-32bit-or-64bit-version-of-that-dll