48.1. Assembly Naming

Every .NET assembly, whether it is an executable or a class library, contains a manifest that contains information about the assembly's identity. Primarily, this includes the name and version number of the assembly but can also include a culture and public key if it is a strong-named assembly. This information can be easily viewed by opening an assembly in Lutz Roeder's .NET Reflector, as shown in Figure 48-1.

Figure 48.1. Figure 48-1

In Figure 48-1 the assembly AssemblyInformationApplication.exe does not have a public key. Other assemblies, like System.Data, have a full name such as:

System.Data, Version=2.0.0.0, Culture=neutral, PublicKeytoken=b77a5c561934e089

Specifying the name of your assembly in Visual Studio 2008 is done via the project properties editor, as shown in Figure 48-2. You can see in this figure the Assembly name field on the main Application tab and the Assembly Version field in the inset, which is accessible via the Assembly Information button.

Figure 48.2. Figure 48-2

The assembly properties that are presented in the inset dialog in Figure 48-2 all appear in the AssemblyInfo file that is, by default, a hidden file in the project — select the Show All Files button to reveal the AssemblyInfo file. The following snippet illustrates the ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.