2014-04-13 23 views

回答

5

取決於您想要查找的信息類型...您可以在Xamarin Studio中的項目中添加對DLL的引用,然後展開參考文件夾&雙擊DLL ...這將在AssemblyBrowser中打開並顯示AssemblyInfo被編譯到DLL中。

Viewing AssemblyInfo in Xamarin Studio

如果你想知道什麼架構的DLL是爲建,在終端窗口中運行以下命令:

file insert_filename_here.dll 

如果它是一個86(或「任何CPU」)DLL,它會說:

insert_filename_here.dll: PE32 executable for MS Windows (DLL) (console) Intel 80386 32-bit Mono/.Net assembly 

如果它是一個64位的DLL,它會說:

insert_filename_here.dll: PE32+ executable for MS Windows (DLL) (console) Mono/.Net assembly! 
1

如果使用Mono Cecil將程序集加載到內存(AssemblyDefinition.ReadAssembly)中,則可以讀取版本屬性(AssemblyDefinition.Name.Version)。

https://github.com/jbevain/cecil/tree/master/Mono.Cecil

反射也可以使用,但它需要用戶將組件加載到一個AppDomain這是效率不高。

Xamarin Studio內部使用Cecil或反射來查詢程序集中的相同信息。

0

如果您不需要編程,可以在TextEdit中打開它(快速查看,然後單擊在TextEdit中打開按鈕),並一直滾動到底部。您應該看到類似以下的內容

<MonoTouch,Version=v1.0TFrameworkDisplayName MonoTouchXamarin.MobileXamarin Inc.(#Copyright ¬© 2011-2013 Xamarin Inc.0.7.1.0TWrapNonExceptionThrowsÄû.ÄÑSystem.Security.Permissions.SecurityPermissionAttribute, mscorlib, Version=2.0.5.0, Culture=neutral, 
PublicKeyToken=7cec85d7bea7798eTSkipVerificationúŸæŸ ∞Ÿ_CorDllMainmscoree.dllˇ% Ä0ÄHX‡@@4VS_VERSION_INFOΩÔ˛?DVarFileInfo$Translation∞†StringFileInfo|000004b0<CompanyNameXamarin Inc.HFileDescriptionXamarin 
.Mobile0FileVersion0.7.1.0HInternalNameXamarin.Mobile.dlll#LegalCopyrightCopyright © 2011-2013 Xamarin [email protected]e4ProductVersion0.7.1.08Assembly Version0.7.1.0––9 
0

一種非常快速和簡單的方法是發出cat命令並讀取最後幾行例如

$貓mylibrary.dll

+0

或者只看到文件'$尾-c 1740 Newtonsoft.Json.dll'結束 –