Skip to Main Content
COM & .NET Component Services
book

COM & .NET Component Services

by Juval Lowy
September 2001
Intermediate to advanced content levelIntermediate to advanced
384 pages
11h 59m
English
O'Reilly Media, Inc.
Content preview from COM & .NET Component Services

Composing Assemblies

You provide the compiler with your assembly information in an assembly information file (usually called in a C# project, AssemblyInfo.cs). The assembly information file is compiled with the rest of the project’s source files. The information in the file is in the form of assembly attributes directives to the compiler on the information to embed in the assembly. Example C-2 shows a typical set of assembly attributes.

Example C-2. The assembly information file includes a variety of assembly attributes

[assembly: AssemblyTitle("MyAssembly")]
[assembly: AssemblyDescription("Assembly containing demo .NET components")]
[assembly: AssemblyCompany("My Product")]
[assembly: AssemblyCopyright("(c) 2001 My Company ")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("en-US")]
[assembly: AssemblyVersion("1.0.*")]

Sharing Assemblies

Assemblies can be private or shared. A private assembly resides in the same directory of the application that uses it (or in its path). A shared assembly is in a known location, called the global assembly cache (GAC), mentioned in Chapter 10 Chapter 10. To add an assembly to the GAC, use either the .NET administration tool or the GACUtil command-line utility. Once in the GAC, the assembly can be accessed by multiple applications, both managed and unmanaged.

To avoid conflicts in the GAC between different assemblies that have the same name, a shared assembly must have a strong name. The strong name authenticates the assembly’s origin ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Windows Server® 2008 Security Resource Kit

Windows Server® 2008 Security Resource Kit

Jesper M. Johansson

Publisher Resources

ISBN: 0596001037Supplemental ContentCatalog PageErrata