Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Metadata and Manifest

I'm learning .NET framework and been reading through Metadata and Manifest.

"Metadata is data about data and Manifest is data about assembly!!"

Q: So isn't Manifest a metadata?

Then what are its differences?

like image 793
Rohit Vipin Mathews Avatar asked Feb 23 '12 04:02

Rohit Vipin Mathews


3 Answers

Here is the simplest answer.

Assembly : One or more Files comprising your program. Usually Exe or dll or a combination of these and some other set of files

MetaData : Contains both 1)Assembly Metadata 2) Type Metadata.

1)Assembly Metadata is also known as MANIFEST, It contains Assembly's Name, Versions, Culture, Strong Name Info, Referenced assembly info...etc.

2)Type Metadata is the data types exported and Methods of the assembly.

enter image description here

like image 70
Pranesh Archak Avatar answered Nov 02 '22 16:11

Pranesh Archak


Manifest maintains the information about the assemblies like version, name locale and an optional strong name that uniquely identifying the assembly. This manifest information is used by the CLR. The manifest also contains the security demands to verify this assembly. It also contains the names and hashes of all the files that make up the assembly. The .NET assembly manifest contains a cryptographic hash of different modules in the assembly. And when the assembly is loaded, the CLR recalculates the hash of the modules at hand, and compares it with the embedded hash. If the hash generated at runtime is different from that found in the manifest, .NET refuses to load the assembly and throws an exception.

Metadata means data about the data. Metadata yields the types available in that assembly, viz. classes, interfaces, enums, structs, etc., and their containing namespaces, the name of each type, its visibility/scope, its base class, the interfaces it implemented, its methods and their scope, and each method’s parameters, type’s properties, and so on. The assembly metadata is generated by the high-level compilers automatically from the source files. The compiler embeds the metadata in the target output file, a dll, an .exe or a .netmodule in the case of multi-module assembly.

like image 25
Teju MB Avatar answered Nov 02 '22 17:11

Teju MB


Manifest: it store the information (like name of assemblies, version etc) about the assemblies which is required by CLR to load the assemblies.

Metadata : It store the detail of assemblies like method name, it's members etc.

Both the files are generated automatically by the compiler when converting the code to MSIL.

like image 33
amit Avatar answered Nov 02 '22 17:11

amit