https://docs.microsoft.com/en-us/dotnet/standard/assembly/file-format

.NET defines a binary file format - "assembly" - that is used to fully-describe and contain .NET programs.

Assemblies are used for the programs themselves as well as any dependent libraries.

A .NET program can be executed as one or more assemblies, with no other required artifacts, beyond the appropriate .NET implementation.

Native dependencies, including operating system APIs, are a separate concern and are not contained within the .NET assembly format, although are sometimes described with this format (for example, WinRT).

Each CLI component carries the metadata for declarations, implementations, and references specific to that component. Therefore, the component-specific metadata is referred to as component metadata, and the resulting component is said to be self-describing – from ECMA 335 I.9.1, Components and assemblies.

The format is fully specified and standardized as ECMA 335.

All .NET compilers and runtimes use this format.

The presence of a documented and infrequently updated binary format has been a major benefit (arguably a requirement) for interoperability.

The format was last updated in a substantive way in 2005 (.NET 2.0) to accommodate generics and processor architecture.

The format is CPU- and OS-agnostic.

It has been used as part of .NET implementations that target many chips and CPUs.

While the format itself has Windows heritage, it is implementable on any operating system.

Its arguably most significant choice for OS interoperability is that most values are stored in little-endian format.

It doesn’t have a specific affinity to machine pointer size (for example, 32-bit, 64-bit).

The .NET assembly format is also very descriptive about the structure of a given program or library.

It describes the internal components of an assembly, specifically: assembly references and types defined and their internal structure.

Tools or APIs can read and process this information for display or to make programmatic decisions.

Format

https://en.wikipedia.org/wiki/Portable_Executable

The .NET binary format is based on the Windows PE file format. In fact, .NET class libraries are conformant Windows PEs, and appear on first glance to be Windows dynamic link libraries (DLLs) or application executables (EXEs). This is a very useful characteristic on Windows, where they can masquerade伪装 as native executable binaries and get some of the same treatment (for example, OS load, PE tools).

Assembly Headers from ECMA 335 II.25.1, Structure of the runtime file format.

Processing the Assemblies

It is possible to write tools or APIs to process assemblies.

Assembly information enables making programmatic decisions at runtime, re-writing assemblies, providing API IntelliSense in an editor and generating documentation.

System.Reflection and Mono.Cecil are good examples of tools that are frequently used for this purpose.

.NET Assembly File Format的更多相关文章

  1. dnSpy PE format ( Portable Executable File Format)

    Portable Executable File Format PE Format  微软官方的 What is a .PE file in the .NET framework? [closed] ...

  2. could not read symbols: File format not recognized

    arm-linux-gnueabi-readelf工具解决问题 编译一个32位平台的内核时,出现如下错误提示: libschw.a: could not read symbols: File form ...

  3. Java class file format specfication

    Java class file format spec Link: https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html Her ...

  4. NopCommerce 发布时 Could not load file or assembly 'file:///...\Autofac.3.5.2\lib\net40\Autofac.dll' or one of its dependencies

    本文转自:http://www.nopcommerce.com/boards/t/33637/4-errors.aspx 问题: The 3.5 solution compiles fine, and ...

  5. Does the OpenSceneGraph have a native file format?

    From OpenSceneGraph-3.0 onwards we have new native file formats based on generic serializers that ar ...

  6. 遇到一个奇葩的问题,could not load the assembly file XXX downloaded from the Web

    在我这编译好好滴,发给客户那边居然不通过,报could not load the assembly file:///xxx.dll, 查阅了一些文档后,发现原来是文件的安全问题,是由于我把文件压缩打包 ...

  7. VMWare File Format Learning && Use VHD File To Boot VMWare && CoreOS Docker Configuration And Running

    目录 . Virtual Machine Introduce . Vmware Image File Format . VHD File Format . Convert VHD File Into ...

  8. 配置tomcat连接器后,启动服务报错“No Certificate file specified or invalid file format"异常

    1:原来的配置是 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true&quo ...

  9. 配置CAS错误No Certificate file specified or invalid file format

    配置tomcat证书 keystore文件后启动一直报错:(tomcat版本:apache-tomcat-6.0.43) tomcat配置: <Connector port="8443 ...

随机推荐

  1. 《Redis高阶应用》讲座总结

    数据结构延展 常用数据结构:String,Hash,List,Set,Sorted Set(不聊这些) 高级数据结构:Bitmaps,hyperloglog,GEO 单机拓展到分布式 为什么要分区:性 ...

  2. Java高并发程序设计学习笔记(六):JDK并发包(线程池的基本使用、ForkJoin)

    转自:https://blog.csdn.net/dataiyangu/article/details/86573222 1. 线程池的基本使用1.1. 为什么需要线程池1.2. JDK为我们提供了哪 ...

  3. Redis-Set常用命令

    Redis-Set常用命令 Set与List的区别在于,Set保存的队列数据是不重复的,且无序 sadd key value- 在指定key对应的集合中添加 value集合,如果key不存在,即新创建 ...

  4. 【玩转SpringBoot】通过事件机制参与SpringBoot应用的启动过程

    生命周期和事件监听 一个应用的启动过程和关闭过程是归属到“生命周期”这个概念的范畴. 典型的设计是在启动和关闭过程中会触发一系列的“事件”,我们只要监听这些事件,就能参与到这个过程中来. 要想监听事件 ...

  5. axios+post获取并下载后台返回的二进制流

    axios+post获取并下载后台返回的二进制流 let url = $.getCookie('prefixUrl')+'/expenseword/exportWords'; let vm = thi ...

  6. busybox date 时间的加减

    1.下载安装busybox: # wget http://busybox.net/downloads/busybox-1.29.3.tar.bz2 # tar -jxvf busybox-.tar.b ...

  7. 【C】文件操作

    文件操作 文件的打开 FILE * fopen(const char filename,const char * mode); 文件的打开操作 fopen 打开一个文件 (几种操作文件的组合) 文件的 ...

  8. KeyError: 'pass_ticket'

    使用wxpy模块对接微信登陆,在扫描程序弹出二维码后,使用手机微信扫描登陆之后报KeyError: 'pass_ticket'. 原因就是微信禁止该账号登陆微信网页版,如下图: 所以,去找到能让账号登 ...

  9. java 权限控制

    网上或参考书中,对于java权限控制大多给出一张看似很整齐很好记实则不好理解的表格,我整理了一个2.0升级版,自认为会好理解很多,希望可以有所帮助. 同一包内 不同包内 修饰符 当前类 非当前类(含子 ...

  10. 中国剩余定理(crt)和扩展中国剩余定理(excrt)

    数论守门员二号 =.= 中国剩余定理: 1.一次同余方程组: 一次同余方程组是指形如x≡ai(mod mi) (i=1,2,…,k)的同余方程构成的组 中国剩余定理的主要用途是解一次同余方程组,其中m ...