Difficulty: Easy
Correct Answer: It provides the assembly name, version, culture, public key, list of files in the assembly, and references to other assemblies required at runtime.
Explanation:
Introduction / Context:
The assembly manifest is a key part of .NET assemblies and informs the common language runtime how to identify, load, and bind them. This question focuses on the specific types of information that the manifest contains. Knowing what is stored in the manifest helps you understand versioning, strong naming, and dependency resolution in .NET applications.
Given Data / Assumptions:
- Assemblies are unit of deployment and versioning in .NET.
- The manifest is embedded metadata inside each assembly.
- The runtime uses this metadata when loading assemblies and resolving references.
- The manifest is not primarily about layout or networking details.
Concept / Approach:
The manifest records the assembly identity, which includes a simple name, version, culture, and public key token for strong named assemblies. It also lists the files that belong to the assembly, which may include modules and resources, and it records references to external assemblies along with the required versions. This information allows the runtime to verify that the correct assembly and its dependencies are loaded, enforce version policy, and support side by side execution of different versions.
Step-by-Step Solution:
Step 1: Identify core identity fields: assembly name, version number, culture, and public key.
Step 2: Recognize that the manifest contains a file list that enumerates all files packaged within the assembly, such as modules or resource files.
Step 3: Remember that the manifest includes references to dependent assemblies, including their identities and version requirements.
Step 4: Choose the option that lists these categories of information accurately.
Verification / Alternative check:
Using tools like ILDasm, you can inspect the manifest of a compiled assembly and see entries such as .assembly, .ver, and .file, along with .assembly extern entries for referenced assemblies. These entries clearly show identity and dependency information. This matches the description in the correct option and shows that the manifest is not concerned with user interface layout or network topology.
Why Other Options Are Wrong:
Option B is wrong because user interface layout is usually defined in XAML, Windows Forms designer code, or other resources, not in the assembly manifest. Option C is incorrect since the manifest does not store full source code; compiled IL and metadata are separate parts of the assembly. Option D is unrelated to assemblies, as network topology is managed by administrators and devices, not by .NET assembly metadata.
Common Pitfalls:
A common pitfall is ignoring manifest information when dealing with assembly binding errors, which often mention version mismatches or missing referenced assemblies. Another pitfall is assuming that copying assemblies manually without considering manifest references will always succeed. Understanding the manifest contents helps when troubleshooting these issues and when configuring binding redirects in application configuration files.
Final Answer:
An assembly manifest provides the assembly name, version, culture, public key, the list of files that make up the assembly, and the references to other assemblies that it requires, so that the runtime can load and bind everything correctly.
Discussion & Comments