Udostępnij za pośrednictwem


How to: Share an Assembly with Other Applications (C# Programming Guide)

Assemblies can be private or shared: by default, most simple C# programs consist of a private assembly because they are not intended to be used by other applications.

In order to share an assembly with other applications, it must be placed in the Global Assembly Cache (GAC).

Sharing an assembly

  1. Create your assembly. For more information, see Creating Assemblies.

  2. Assign a strong name to your assembly. For more information, see How to: Sign an Assembly with a Strong Name.

  3. Assign version information to your assembly. For more information, see Assembly Versioning.

  4. Add your assembly to the Global Assembly Cache. For more information, see How to: Install an Assembly into the Global Assembly Cache.

  5. Access the types contained in the assembly from the other applications. For more information, see How to: Reference a Strong-Named Assembly.

See Also

Concepts

C# Programming Guide

Strong-Named Assemblies

Other Resources

Programming with Assemblies

Working with Assemblies and the Global Assembly Cache

Creating and Using Strong-Named Assemblies