.NET Samples - How To: Assemblies

This section includes the following samples:

Publisher.cfg Sample

Delay Signing Sample

Strong Names Sample

Math Sample

Config Example Sample

Publisher.cfg Sample

This sample illustrates using publisher policy to describe compatibility. The publisher policy statement is an XML configuration file wrapped as a separate assembly.

Namespaces used in this sample:

(none)

Classes used in this sample:

(none)

Delay Signing Sample

This sample creates a delay-signed assembly. It creates a key pair, separates the public and private keys, and uses the Strong Name tool (Sn.exe) to request that signature verification be skipped.

Namespaces used in this sample:

System; System.Reflection

Classes used in this sample:

Assembly; Attribute; AssemblyKeyFileAttribute; File; AssemblyDelaySignAttribute

Strong Names Sample

This sample uses the Strong Name tool (Sn.exe) to generate a key pair and then builds a strong-named assembly.

Namespaces used in this sample:

System; System.Reflection

Classes used in this sample:

AssemblyKeyFileAttribute; StrongName; File; Assembly; Attribute

Math Sample

This sample illustrates using version policy to run an application with a different version of a dependent assembly. Version policies can be included in an application's configuration file.

Namespaces used in this sample:

System; System.Reflection

Classes used in this sample:

String; Form; Math; Console; Assembly; Convert; Version; File; Exception

Config Example Sample

This sample illustrates modifying the privatePath attribute. The privatePath is a list of directories in which the common language runtime will search for private assemblies.

Namespaces used in this sample:

System; System.Runtime.CompilerServices; System.Reflection

Classes used in this sample:

String; Math; Console; Form; Convert; Service; Attribute; Version; Assembly; AssemblyVersionAttribute; Message; Exception