AppDomain.ExecuteAssembly 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 파일에 포함된 어셈블리를 실행합니다.
오버로드
| Name | Description |
|---|---|
| ExecuteAssembly(String, Evidence, String[], Byte[], AssemblyHashAlgorithm) |
사용되지 않음.
지정된 증명 정보, 인수, 해시 값 및 해시 알고리즘을 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, Evidence, String[]) |
사용되지 않음.
지정된 증명 정보 및 인수를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, String[], Byte[], AssemblyHashAlgorithm) |
사용되지 않음.
지정된 인수, 해시 값 및 해시 알고리즘을 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, Evidence) |
사용되지 않음.
지정된 증명 정보를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, String[]) |
지정된 인수를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String) |
지정된 파일에 포함된 어셈블리를 실행합니다. |
ExecuteAssembly(String, Evidence, String[], Byte[], AssemblyHashAlgorithm)
주의
Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
지정된 증명 정보, 인수, 해시 값 및 해시 알고리즘을 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다.
public:
int ExecuteAssembly(System::String ^ assemblyFile, System::Security::Policy::Evidence ^ assemblySecurity, cli::array <System::String ^> ^ args, cli::array <System::Byte> ^ hashValue, System::Configuration::Assemblies::AssemblyHashAlgorithm hashAlgorithm);
public int ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args, byte[] hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm);
[System.Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public int ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args, byte[] hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm);
member this.ExecuteAssembly : string * System.Security.Policy.Evidence * string[] * byte[] * System.Configuration.Assemblies.AssemblyHashAlgorithm -> int
[<System.Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
member this.ExecuteAssembly : string * System.Security.Policy.Evidence * string[] * byte[] * System.Configuration.Assemblies.AssemblyHashAlgorithm -> int
Public Function ExecuteAssembly (assemblyFile As String, assemblySecurity As Evidence, args As String(), hashValue As Byte(), hashAlgorithm As AssemblyHashAlgorithm) As Integer
매개 변수
- assemblyFile
- String
실행할 어셈블리를 포함하는 파일의 이름입니다.
- assemblySecurity
- Evidence
어셈블리에 대한 제공된 증거입니다.
- args
- String[]
어셈블리의 진입점에 대한 인수입니다.
- hashValue
- Byte[]
계산된 해시 코드의 값을 나타냅니다.
- hashAlgorithm
- AssemblyHashAlgorithm
어셈블리 매니페스트에서 사용하는 해시 알고리즘을 나타냅니다.
반품
어셈블리의 진입점에서 반환되는 값입니다.
- 특성
예외
assemblyFile은 null입니다.
assemblyFile 찾을 수 없습니다.
assemblyFile 가 현재 로드된 런타임에 유효한 어셈블리가 아닌 경우
작업이 언로드된 애플리케이션 도메인에서 시도됩니다.
어셈블리 또는 모듈이 두 개의 서로 다른 증명 정보로 두 번 로드되었습니다.
assemblySecurity 가 아닙니다 null. 레거시 CAS 정책을 사용하도록 설정 assemblySecuritynull하지 않은 경우 .
지정된 어셈블리에 진입점이 없습니다.
적용 대상
ExecuteAssembly(String, Evidence, String[])
주의
Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
지정된 증명 정보 및 인수를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다.
public:
virtual int ExecuteAssembly(System::String ^ assemblyFile, System::Security::Policy::Evidence ^ assemblySecurity, cli::array <System::String ^> ^ args);
public int ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args);
[System.Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public int ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args);
abstract member ExecuteAssembly : string * System.Security.Policy.Evidence * string[] -> int
override this.ExecuteAssembly : string * System.Security.Policy.Evidence * string[] -> int
[<System.Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
abstract member ExecuteAssembly : string * System.Security.Policy.Evidence * string[] -> int
override this.ExecuteAssembly : string * System.Security.Policy.Evidence * string[] -> int
Public Function ExecuteAssembly (assemblyFile As String, assemblySecurity As Evidence, args As String()) As Integer
매개 변수
- assemblyFile
- String
실행할 어셈블리를 포함하는 파일의 이름입니다.
- assemblySecurity
- Evidence
어셈블리에 대한 제공된 증거입니다.
- args
- String[]
어셈블리의 진입점에 대한 인수입니다.
반품
어셈블리의 진입점에서 반환되는 값입니다.
구현
- 특성
예외
assemblyFile은 null입니다.
assemblyFile 찾을 수 없습니다.
assemblyFile 가 현재 로드된 런타임에 유효한 어셈블리가 아닌 경우
작업이 언로드된 애플리케이션 도메인에서 시도됩니다.
어셈블리 또는 모듈이 두 개의 서로 다른 증명 정보로 두 번 로드되었습니다.
assemblySecurity 가 아닙니다 null. 레거시 CAS 정책을 사용하도록 설정 assemblySecuritynull하지 않은 경우 .
지정된 어셈블리에 진입점이 없습니다.
적용 대상
ExecuteAssembly(String, String[], Byte[], AssemblyHashAlgorithm)
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
주의
Code Access Security is not supported or honored by the runtime.
지정된 인수, 해시 값 및 해시 알고리즘을 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다.
public:
int ExecuteAssembly(System::String ^ assemblyFile, cli::array <System::String ^> ^ args, cli::array <System::Byte> ^ hashValue, System::Configuration::Assemblies::AssemblyHashAlgorithm hashAlgorithm);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public int ExecuteAssembly(string assemblyFile, string?[]? args, byte[]? hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")]
public int ExecuteAssembly(string assemblyFile, string?[]? args, byte[]? hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm);
public int ExecuteAssembly(string assemblyFile, string[] args, byte[] hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm);
public int ExecuteAssembly(string assemblyFile, string?[]? args, byte[]? hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.ExecuteAssembly : string * string[] * byte[] * System.Configuration.Assemblies.AssemblyHashAlgorithm -> int
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")>]
member this.ExecuteAssembly : string * string[] * byte[] * System.Configuration.Assemblies.AssemblyHashAlgorithm -> int
member this.ExecuteAssembly : string * string[] * byte[] * System.Configuration.Assemblies.AssemblyHashAlgorithm -> int
Public Function ExecuteAssembly (assemblyFile As String, args As String(), hashValue As Byte(), hashAlgorithm As AssemblyHashAlgorithm) As Integer
매개 변수
- assemblyFile
- String
실행할 어셈블리를 포함하는 파일의 이름입니다.
- args
- String[]
어셈블리의 진입점에 대한 인수입니다.
- hashValue
- Byte[]
계산된 해시 코드의 값을 나타냅니다.
- hashAlgorithm
- AssemblyHashAlgorithm
어셈블리 매니페스트에서 사용하는 해시 알고리즘을 나타냅니다.
반품
어셈블리의 진입점에서 반환되는 값입니다.
- 특성
예외
assemblyFile은 null입니다.
assemblyFile 찾을 수 없습니다.
assemblyFile 가 현재 로드된 런타임에 유효한 어셈블리가 아닌 경우
작업이 언로드된 애플리케이션 도메인에서 시도됩니다.
어셈블리 또는 모듈이 두 개의 서로 다른 증명 정보로 두 번 로드되었습니다.
지정된 어셈블리에 진입점이 없습니다.
적용 대상
ExecuteAssembly(String, Evidence)
주의
Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
지정된 증명 정보를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다.
public:
virtual int ExecuteAssembly(System::String ^ assemblyFile, System::Security::Policy::Evidence ^ assemblySecurity);
public int ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity);
[System.Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public int ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity);
abstract member ExecuteAssembly : string * System.Security.Policy.Evidence -> int
override this.ExecuteAssembly : string * System.Security.Policy.Evidence -> int
[<System.Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
abstract member ExecuteAssembly : string * System.Security.Policy.Evidence -> int
override this.ExecuteAssembly : string * System.Security.Policy.Evidence -> int
Public Function ExecuteAssembly (assemblyFile As String, assemblySecurity As Evidence) As Integer
매개 변수
- assemblyFile
- String
실행할 어셈블리를 포함하는 파일의 이름입니다.
- assemblySecurity
- Evidence
어셈블리를 로드하기 위한 증거입니다.
반품
어셈블리의 진입점에서 반환되는 값입니다.
구현
- 특성
예외
assemblyFile은 null입니다.
assemblyFile 찾을 수 없습니다.
assemblyFile 가 현재 로드된 런타임에 유효한 어셈블리가 아닌 경우
작업이 언로드된 애플리케이션 도메인에서 시도됩니다.
어셈블리 또는 모듈이 두 개의 서로 다른 증명 정보로 두 번 로드되었습니다.
지정된 어셈블리에 진입점이 없습니다.
적용 대상
ExecuteAssembly(String, String[])
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
지정된 인수를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다.
public:
int ExecuteAssembly(System::String ^ assemblyFile, cli::array <System::String ^> ^ args);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")]
public int ExecuteAssembly(string assemblyFile, string?[]? args);
public int ExecuteAssembly(string assemblyFile, string[] args);
public int ExecuteAssembly(string assemblyFile, string?[]? args);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")>]
member this.ExecuteAssembly : string * string[] -> int
member this.ExecuteAssembly : string * string[] -> int
Public Function ExecuteAssembly (assemblyFile As String, args As String()) As Integer
매개 변수
- assemblyFile
- String
실행할 어셈블리를 포함하는 파일의 이름입니다.
- args
- String[]
어셈블리의 진입점에 대한 인수입니다.
반품
어셈블리의 진입점에서 반환되는 값입니다.
- 특성
예외
assemblyFile은 null입니다.
assemblyFile 찾을 수 없습니다.
assemblyFile 가 현재 로드된 런타임에 유효한 어셈블리가 아닌 경우
작업이 언로드된 애플리케이션 도메인에서 시도됩니다.
어셈블리 또는 모듈이 두 개의 서로 다른 증명 정보로 두 번 로드되었습니다.
지정된 어셈블리에 진입점이 없습니다.
예제
다음 샘플에서는 서로 다른 두 도메인의 ExecuteAssembly 오버로드 중 하나를 사용하는 방법을 보여 줍니다.
int main()
{
AppDomain^ currentDomain = AppDomain::CurrentDomain;
AppDomain^ otherDomain = AppDomain::CreateDomain( "otherDomain" );
currentDomain->ExecuteAssembly( "MyExecutable.exe" );
// Prints S"MyExecutable running on [default]"
otherDomain->ExecuteAssembly( "MyExecutable.exe" );
// Prints S"MyExecutable running on otherDomain"
}
class ExecuteAssemblySnippet {
public static void Main() {
AppDomain currentDomain = AppDomain.CurrentDomain;
AppDomain otherDomain = AppDomain.CreateDomain("otherDomain");
currentDomain.ExecuteAssembly("MyExecutable.exe");
// Prints "MyExecutable running on [default]"
otherDomain.ExecuteAssembly("MyExecutable.exe");
// Prints "MyExecutable running on otherDomain"
}
}
open System
let currentDomain = AppDomain.CurrentDomain
let otherDomain = AppDomain.CreateDomain "otherDomain"
currentDomain.ExecuteAssembly "MyExecutable.exe"
// Prints "MyExecutable running on [default]"
otherDomain.ExecuteAssembly "MyExecutable.exe"
// Prints "MyExecutable running on otherDomain"
Module Test
Sub Main()
Dim currentDomain As AppDomain = AppDomain.CurrentDomain
Dim otherDomain As AppDomain = AppDomain.CreateDomain("otherDomain")
currentDomain.ExecuteAssembly("MyExecutable.exe")
' Prints "MyExecutable running on [default]"
otherDomain.ExecuteAssembly("MyExecutable.exe")
' Prints "MyExecutable running on otherDomain"
End Sub
End Module 'Test
설명
어셈블리가 .NET Framework 헤더에 지정된 진입점에서 실행되기 시작합니다.
이 메서드는 새 프로세스 또는 애플리케이션 도메인을 만들지 않으며 새 스레드에서 진입점 메서드를 실행하지 않습니다.
이 메서드는 메서드를 사용하여 어셈블리를 로드합니다 LoadFile . 메서드를 사용하여 어셈블리를 ExecuteAssemblyByName 로드하는 메서드를 사용하여 어셈블리를 Load 실행할 수도 있습니다.
적용 대상
ExecuteAssembly(String)
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
- Source:
- AppDomain.cs
지정된 파일에 포함된 어셈블리를 실행합니다.
public:
int ExecuteAssembly(System::String ^ assemblyFile);
public:
virtual int ExecuteAssembly(System::String ^ assemblyFile);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")]
public int ExecuteAssembly(string assemblyFile);
public int ExecuteAssembly(string assemblyFile);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Types and members the loaded assembly depends on might be removed")>]
member this.ExecuteAssembly : string -> int
member this.ExecuteAssembly : string -> int
abstract member ExecuteAssembly : string -> int
override this.ExecuteAssembly : string -> int
Public Function ExecuteAssembly (assemblyFile As String) As Integer
매개 변수
- assemblyFile
- String
실행할 어셈블리를 포함하는 파일의 이름입니다.
반품
어셈블리의 진입점에서 반환되는 값입니다.
구현
- 특성
예외
assemblyFile은 null입니다.
assemblyFile 찾을 수 없습니다.
assemblyFile 가 현재 로드된 런타임에 유효한 어셈블리가 아닌 경우
작업이 언로드된 애플리케이션 도메인에서 시도됩니다.
어셈블리 또는 모듈이 두 개의 서로 다른 증명 정보로 두 번 로드되었습니다.
지정된 어셈블리에 진입점이 없습니다.
예제
다음 샘플에서는 서로 다른 두 도메인의 ExecuteAssembly 오버로드 중 하나를 사용하는 방법을 보여 줍니다.
int main()
{
AppDomain^ currentDomain = AppDomain::CurrentDomain;
AppDomain^ otherDomain = AppDomain::CreateDomain( "otherDomain" );
currentDomain->ExecuteAssembly( "MyExecutable.exe" );
// Prints S"MyExecutable running on [default]"
otherDomain->ExecuteAssembly( "MyExecutable.exe" );
// Prints S"MyExecutable running on otherDomain"
}
class ExecuteAssemblySnippet {
public static void Main() {
AppDomain currentDomain = AppDomain.CurrentDomain;
AppDomain otherDomain = AppDomain.CreateDomain("otherDomain");
currentDomain.ExecuteAssembly("MyExecutable.exe");
// Prints "MyExecutable running on [default]"
otherDomain.ExecuteAssembly("MyExecutable.exe");
// Prints "MyExecutable running on otherDomain"
}
}
open System
let currentDomain = AppDomain.CurrentDomain
let otherDomain = AppDomain.CreateDomain "otherDomain"
currentDomain.ExecuteAssembly "MyExecutable.exe"
// Prints "MyExecutable running on [default]"
otherDomain.ExecuteAssembly "MyExecutable.exe"
// Prints "MyExecutable running on otherDomain"
Module Test
Sub Main()
Dim currentDomain As AppDomain = AppDomain.CurrentDomain
Dim otherDomain As AppDomain = AppDomain.CreateDomain("otherDomain")
currentDomain.ExecuteAssembly("MyExecutable.exe")
' Prints "MyExecutable running on [default]"
otherDomain.ExecuteAssembly("MyExecutable.exe")
' Prints "MyExecutable running on otherDomain"
End Sub
End Module 'Test
설명
어셈블리가 .NET Framework 헤더에 지정된 진입점에서 실행되기 시작합니다.
이 메서드는 새 프로세스 또는 애플리케이션 도메인을 만들지 않으며 새 스레드에서 진입점 메서드를 실행하지 않습니다.
이 메서드는 메서드를 사용하여 어셈블리를 로드합니다 LoadFile . 메서드를 사용하여 어셈블리를 ExecuteAssemblyByName 로드하는 메서드를 사용하여 어셈블리를 Load 실행할 수도 있습니다.
로드 및 실행할 메서드를 만들 AppDomain 려면 이 메서드를 CreateDomain 사용합니다.