CHAPTER 2 Building, Packaging, Deploying, and Administering Applications and Types Flashcards
.NET Framework Deployment Goals
addresses the DLL hell issue
fixing the problem of having an application’s state scattered all over a user’s hard disk
security
MSCorLib.dll
MSCorLib.dll is a special file in that it contains all the core types: Byte, Char, String, Int32, and many more.
Building Types into a Module
csc.exe /out:Program.exe /t:exe /r:MSCorLib.dll Program.cs
Response Files
A response file is a text file that contains a set of compiler command-line switches.
The C# compiler supports multiple response files.
PE32(+) header
PE32(+) header is the standard information that Windows expects
CLR header
CLR header is a small block of information that is specific to modules that require the CLR (managed modules).
version number of the CLR that the module was built for a MethodDef token indicating the module’s entry point method an optional strong-name digital signature
contains the size and offsets of certain metadata tables contained within
the module
metadata
The metadata is a block of binary data that consists of several tables.
definition tables
reference tables
manifest tables
Common Definition Metadata Tables
ModuleDef TypeDef MethodDef FieldDef ParamDef PropertyDef EventDef
Common Reference Metadata Tables
AssemblyRef
ModuleRef
TypeRef
MemberRef
manifest
The manifest is another set of metadata tables that basically contain the names of the files that are part of the assembly.
They also describe the assembly’s version, culture, publisher, publicly exported types, and all of the files that
comprise the assembly.
characteristics of assemblies
An assembly defines the reusable types
An assembly is marked with a version number
An assembly can have security information associated with it
three reasons to use multifile assemblies
You can partition your types among separate files, allowing for files to be incrementally downloaded as described in the Internet download scenario
You can add resource or data files to your assembly
You can create assemblies consisting of types implemented in different programming languages
Manifest Metadata Tables
AssemblyDef
FileDef
ManifestResourceDef
ExportedTypesDef
Assembly Version Resource Information
When building an assembly, you should set the version resource fields by using custom attributes that you apply at the assembly level in your source code.
Version Numbers
Culture