RegistrationHelper.InstallAssembly 메서드

정의

COM+ 카탈로그에 사용할 수 있는 런타임 구성 요소를 제공합니다.

오버로드

InstallAssembly(String, String, String, InstallationFlags)

COM+ 애플리케이션에 명명된 어셈블리를 설치합니다.

InstallAssembly(String, String, String, String, InstallationFlags)

COM+ 애플리케이션에 명명된 어셈블리를 설치합니다.

InstallAssembly(String, String, String, InstallationFlags)

COM+ 애플리케이션에 명명된 어셈블리를 설치합니다.

public:
 virtual void InstallAssembly(System::String ^ assembly, System::String ^ % application, System::String ^ % tlb, System::EnterpriseServices::InstallationFlags installFlags);
public void InstallAssembly (string assembly, ref string application, ref string tlb, System.EnterpriseServices.InstallationFlags installFlags);
abstract member InstallAssembly : string * string * string * System.EnterpriseServices.InstallationFlags -> unit
override this.InstallAssembly : string * string * string * System.EnterpriseServices.InstallationFlags -> unit
Public Sub InstallAssembly (assembly As String, ByRef application As String, ByRef tlb As String, installFlags As InstallationFlags)

매개 변수

assembly
String

설치할 어셈블리의 파일 이름입니다.

application
String

어셈블리를 설치할 COM+ 애플리케이션의 이름입니다. 이 매개 변수는 null일 수 있습니다. 매개 변수가 null이고 어셈블리에 ApplicationNameAttribute가 포함되어 있으면 특성이 사용됩니다. 그렇지 않은 경우에는 애플리케이션의 이름이 어셈블리 이름을 기반으로 생성되고 반환됩니다.

tlb
String

출력 형식 라이브러리 내보내기 파일(Tlbexp.exe)의 이름이거나 등록 도우미가 해당 이름을 생성하는 경우 null을 포함하는 문자열입니다. 호출이 완료되면 사용된 실제 이름이 매개 변수에 적용됩니다.

installFlags
InstallationFlags

InstallationFlags 값의 비트 조합입니다.

구현

예외

입력 어셈블리에 강력한 이름이 없는 경우

예제

다음 코드 예제를 사용 하는 방법을 보여 줍니다는 InstalAssembly COM + 애플리케이션에서 명명 된 어셈블리를 설치 하는 방법입니다.

String^ applicationName = "Queued Component";
String^ typeLibraryName = nullptr;
RegistrationHelper^ helper = gcnew RegistrationHelper;
// Call the InstallAssembly method passing it the name of the assembly to 
// install as a COM+ application, the COM+ application name, and 
// the name of the type library file.
// Setting the application name and the type library to NULL (nothing in Visual Basic .NET
// allows you to use the COM+ application name that is given in the assembly and 
// the default type library name. The application name in the assembly metadata 
// takes precedence over the application name you provide to InstallAssembly. 
helper->InstallAssembly( "C:..\\..\\QueuedComponent.dll",  applicationName,  typeLibraryName, InstallationFlags::CreateTargetApplication );
Console::WriteLine( "Registration succeeded: Type library {0} created.", typeLibraryName );
Console::Read();
string applicationName = "Queued Component";			
string typeLibraryName = null;
RegistrationHelper helper = new RegistrationHelper();
// Call the InstallAssembly method passing it the name of the assembly to
// install as a COM+ application, the COM+ application name, and
// the name of the type library file.
// Setting the application name and the type library to NULL (nothing in Visual Basic .NET
// allows you to use the COM+ application name that is given in the assembly and
// the default type library name. The application name in the assembly metadata
// takes precedence over the application name you provide to InstallAssembly.
helper.InstallAssembly(@"C:..\..\QueuedComponent.dll", ref applicationName, ref typeLibraryName, InstallationFlags.CreateTargetApplication);
Console.WriteLine("Registration succeeded: Type library {0} created.", typeLibraryName);
Console.Read();
Dim applicationName As String = "Queued Component"
Dim typeLibraryName As String = Nothing
Dim helper As New RegistrationHelper

' Call the InstallAssembly method passing it the name of the assembly to 
' install as a COM+ application, the COM+ application name, and 
' the name of the type library file.
' Setting the application name and the type library to NULL (nothing in Visual Basic .NET
' allows you to use the COM+ application name that is given in the assembly and 
' the default type library name. The application name in the assembly metadata 
' takes precedence over the application name you provide to InstallAssembly. 
helper.InstallAssembly("C:..\..\QueuedComponent.dll", applicationName, typeLibraryName, InstallationFlags.CreateTargetApplication)
MsgBox("Registration succeeded: Type library " & typeLibraryName & " created.")
Console.Read()

설명

InstallAssembly 다음 단계를 수행 합니다: 등록, 생성 형식 라이브러리, 형식 라이브러리의 등록, 지정 된 애플리케이션 및 형식 라이브러리에 포함 된 구성 요소 구성에서 형식 라이브러리를 설치 합니다.

이 메서드는 호출자가 로컬 컴퓨터에 대 한 관리자 권한이 필요 합니다.

적용 대상

InstallAssembly(String, String, String, String, InstallationFlags)

COM+ 애플리케이션에 명명된 어셈블리를 설치합니다.

public:
 void InstallAssembly(System::String ^ assembly, System::String ^ % application, System::String ^ partition, System::String ^ % tlb, System::EnterpriseServices::InstallationFlags installFlags);
public void InstallAssembly (string assembly, ref string application, string partition, ref string tlb, System.EnterpriseServices.InstallationFlags installFlags);
member this.InstallAssembly : string * string * string * string * System.EnterpriseServices.InstallationFlags -> unit
Public Sub InstallAssembly (assembly As String, ByRef application As String, partition As String, ByRef tlb As String, installFlags As InstallationFlags)

매개 변수

assembly
String

설치할 어셈블리의 파일 이름입니다.

application
String

어셈블리를 설치할 COM+ 애플리케이션의 이름입니다. 이 매개 변수는 null일 수 있습니다. 매개 변수가 null이고 어셈블리에 ApplicationNameAttribute가 포함되어 있으면 특성이 사용됩니다. 그렇지 않은 경우에는 애플리케이션의 이름이 어셈블리 이름을 기반으로 생성되고 반환됩니다.

partition
String

파티션의 이름입니다. 이 매개 변수는 null일 수 있습니다.

tlb
String

출력 형식 라이브러리 내보내기 파일(Tlbexp.exe)의 이름이거나 등록 도우미가 해당 이름을 생성하는 경우 null을 포함하는 문자열입니다. 호출이 완료되면 사용된 실제 이름이 매개 변수에 적용됩니다.

installFlags
InstallationFlags

InstallationFlags 값의 비트 조합입니다.

예외

입력 어셈블리에 강력한 이름이 없는 경우

설명

InstallAssembly 다음 단계를 수행 합니다: 등록, 생성 형식 라이브러리, 형식 라이브러리의 등록, 지정 된 애플리케이션 및 형식 라이브러리에 포함 된 구성 요소 구성에서 형식 라이브러리를 설치 합니다.

이 메서드는 호출자가 로컬 컴퓨터에 대 한 관리자 권한이 필요 합니다.

적용 대상