简体   繁体   English

.NET-如何确定dll是该dll的32位还是64位版本

[英].NET - How can I tell if a dll is a 32bit or 64bit version of that dll

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. 我们在应用程序中有一个项目,该项目根据所构建的机器上的处理器体系结构来构建32位或64位版本的dll,以方便测试。

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. 我可能可以预测将在给定计算机上使用的dll,但是我们有几个开发人员,一些具有64位计算机,一些具有32位计算机,并且我希望能够检查放置在实时服务器上的构建是否已升级与32位版本的dll或64位版本的dll。

Checking properties of a dll doesn't give you this sort of information. 检查dll的属性不会给您这种信息。 Is there a way of getting it? 有办法吗?

Thanks 谢谢

I'm not sure if there is any way you can see wether or not the assembly was compiled for x64 / x86. 我不确定是否可以通过任何方式查看该程序集是否针对x64 / x86进行编译。 You can use corflags to specify though. 您可以使用corflags指定。 msdn page msdn页面

Also you could use this from code: Module.GetPEKind Method 您也可以从代码中使用它 :Module.GetPEKind方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM