Compartilhar via


Posicionamento do Assembly

For most .NET Framework applications, you locate assemblies that make up an application in the application's directory, in a subdirectory of the application's directory, or in the global assembly cache (if the assembly is shared). You can override where the common language runtime looks for an assembly by using the <codeBase> Elemento in a configuration file. If the assembly does not have a strong name, the location specified using the <codeBase> Elemento is restricted to the application directory or a subdirectory. If the assembly has a strong name, the <codeBase> Elemento can specify any location on the computer or on a network.

Regras similares aplicar à localização de assemblies ao trabalhar com código não gerenciado ou aplicativos interop COM : Se o assembly será compartilhado por vários aplicativos, ele deverá ser instalado para o global assembly cache. Assemblies used with unmanaged code must be exported as a type library and registered. Assemblies used by COM interop must be registered in the catalog, although in some cases this registration occurs automatically.

Consulte também

Conceitos

Como o Runtime Localiza Assemblies

Assemblies no Common Language Runtime

Outros recursos

Configuration Files

Interoperabilidade de COM avançadas