AppDomain.ExecuteAssemblyByName 方法

定义

执行程序集。

重载

名称 说明
ExecuteAssemblyByName(String)

执行给定其显示名称的程序集。

ExecuteAssemblyByName(AssemblyName, String[])

使用指定的参数执行给定 AssemblyName的程序集。

ExecuteAssemblyByName(String, Evidence)
已过时.

使用指定的证据执行给定其显示名称的程序集。

ExecuteAssemblyByName(String, String[])

使用指定的参数执行给定其显示名称的程序集。

ExecuteAssemblyByName(AssemblyName, Evidence, String[])
已过时.

使用指定的证据和参数执行给定 AssemblyName的程序集。

ExecuteAssemblyByName(String, Evidence, String[])
已过时.

使用指定的证据和参数执行给定其显示名称的程序集。

ExecuteAssemblyByName(String)

Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs

执行给定其显示名称的程序集。

public:
 int ExecuteAssemblyByName(System::String ^ assemblyName);
public int ExecuteAssemblyByName(string assemblyName);
member this.ExecuteAssemblyByName : string -> int
Public Function ExecuteAssemblyByName (assemblyName As String) As Integer

参数

assemblyName
String

程序集的显示名称。 请参阅 FullName

返回

程序集入口点返回的值。

例外

assemblyNamenull

找不到由 assemblyName 该程序集指定的程序集。

指定的 assemblyName 程序集不是当前加载的运行时的有效程序集。

在卸载的应用程序域中尝试此操作。

找到指定的 assemblyName 程序集,但无法加载。

指定的程序集没有入口点。

注解

该方法 ExecuteAssemblyByName 提供与 ExecuteAssembly 该方法类似的功能,但按显示名称或 AssemblyName 文件位置指定程序集。 因此, ExecuteAssemblyByName 使用 Load 方法而不是方法 LoadFile 加载程序集。

程序集开始在.NET标头中指定的入口点执行。

此方法不会创建新的进程或应用程序域,也不会在新线程上执行入口点方法。

若要创建 AppDomain 要加载和执行的方法,请使用 CreateDomain 该方法。

另请参阅

适用于

ExecuteAssemblyByName(AssemblyName, String[])

Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs

使用指定的参数执行给定 AssemblyName的程序集。

public:
 int ExecuteAssemblyByName(System::Reflection::AssemblyName ^ assemblyName, ... cli::array <System::String ^> ^ args);
public int ExecuteAssemblyByName(System.Reflection.AssemblyName assemblyName, params string?[]? args);
public int ExecuteAssemblyByName(System.Reflection.AssemblyName assemblyName, params string[] args);
member this.ExecuteAssemblyByName : System.Reflection.AssemblyName * string[] -> int
Public Function ExecuteAssemblyByName (assemblyName As AssemblyName, ParamArray args As String()) As Integer

参数

assemblyName
AssemblyName

一个 AssemblyName 表示程序集名称的对象。

args
String[]

启动进程时要传递的命令行参数。

返回

程序集入口点返回的值。

例外

找不到由 assemblyName 该程序集指定的程序集。

找到指定的 assemblyName 程序集,但无法加载。

指定的 assemblyName 程序集不是当前加载的运行时的有效程序集。

在卸载的应用程序域中尝试此操作。

指定的程序集没有入口点。

注解

该方法 ExecuteAssemblyByName 提供与 ExecuteAssembly 该方法类似的功能,但按显示名称或 AssemblyName 文件位置指定程序集。 因此, ExecuteAssemblyByName 使用 Load 方法而不是方法 LoadFile 加载程序集。

程序集开始在.NET标头中指定的入口点执行。

此方法不会创建新的进程或应用程序域,也不会在新线程上执行入口点方法。

适用于

ExecuteAssemblyByName(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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

使用指定的证据执行给定其显示名称的程序集。

public:
 int ExecuteAssemblyByName(System::String ^ assemblyName, System::Security::Policy::Evidence ^ assemblySecurity);
public int ExecuteAssemblyByName(string assemblyName, 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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public int ExecuteAssemblyByName(string assemblyName, System.Security.Policy.Evidence assemblySecurity);
member this.ExecuteAssemblyByName : 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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
member this.ExecuteAssemblyByName : string * System.Security.Policy.Evidence -> int
Public Function ExecuteAssemblyByName (assemblyName As String, assemblySecurity As Evidence) As Integer

参数

assemblyName
String

程序集的显示名称。 请参阅 FullName

assemblySecurity
Evidence

加载程序集的证据。

返回

程序集入口点返回的值。

属性

例外

assemblyNamenull

找不到由 assemblyName 该程序集指定的程序集。

找到指定的 assemblyName 程序集,但无法加载。

指定的 assemblyName 程序集不是当前加载的运行时的有效程序集。

在卸载的应用程序域中尝试此操作。

指定的程序集没有入口点。

注解

该方法 ExecuteAssemblyByName 提供与 ExecuteAssembly 该方法类似的功能,但按显示名称或 AssemblyName 文件位置指定程序集。 因此, ExecuteAssemblyByName 使用 Load 方法而不是方法 LoadFile 加载程序集。

程序集开始在 .NET Framework 标头中指定的入口点执行。

该方法 ExecuteAssemblyByName 不会创建新的进程或应用程序域,也不会在新线程上执行入口点方法。

注释

ExecuteAssemblyByName 该方法与参数一起使用 Evidence 时,将合并证据片段。 作为参数提供的证据片段取代 ExecuteAssemblyByName 加载程序提供的证据片段。

另请参阅

适用于

ExecuteAssemblyByName(String, String[])

Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs
Source:
AppDomain.cs

使用指定的参数执行给定其显示名称的程序集。

public:
 int ExecuteAssemblyByName(System::String ^ assemblyName, ... cli::array <System::String ^> ^ args);
public int ExecuteAssemblyByName(string assemblyName, params string?[]? args);
public int ExecuteAssemblyByName(string assemblyName, params string[] args);
member this.ExecuteAssemblyByName : string * string[] -> int
Public Function ExecuteAssemblyByName (assemblyName As String, ParamArray args As String()) As Integer

参数

assemblyName
String

程序集的显示名称。 请参阅 FullName

args
String[]

启动进程时要传递的命令行参数。

返回

程序集入口点返回的值。

例外

assemblyNamenull

找不到由 assemblyName 该程序集指定的程序集。

找到指定的 assemblyName 程序集,但无法加载。

指定的 assemblyName 程序集不是当前加载的运行时的有效程序集。

在卸载的应用程序域中尝试此操作。

指定的程序集没有入口点。

注解

该方法 ExecuteAssemblyByName 提供与 ExecuteAssembly 该方法类似的功能,但按显示名称或 AssemblyName 文件位置指定程序集。 因此, ExecuteAssemblyByName 使用 Load 方法而不是方法 LoadFile 加载程序集。

程序集开始在.NET标头中指定的入口点执行。

此方法不会创建新的进程或应用程序域,也不会在新线程上执行入口点方法。

适用于

ExecuteAssemblyByName(AssemblyName, 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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

使用指定的证据和参数执行给定 AssemblyName的程序集。

public:
 int ExecuteAssemblyByName(System::Reflection::AssemblyName ^ assemblyName, System::Security::Policy::Evidence ^ assemblySecurity, ... cli::array <System::String ^> ^ args);
public int ExecuteAssemblyByName(System.Reflection.AssemblyName assemblyName, System.Security.Policy.Evidence assemblySecurity, params 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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public int ExecuteAssemblyByName(System.Reflection.AssemblyName assemblyName, System.Security.Policy.Evidence assemblySecurity, params string[] args);
member this.ExecuteAssemblyByName : System.Reflection.AssemblyName * 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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
member this.ExecuteAssemblyByName : System.Reflection.AssemblyName * System.Security.Policy.Evidence * string[] -> int
Public Function ExecuteAssemblyByName (assemblyName As AssemblyName, assemblySecurity As Evidence, ParamArray args As String()) As Integer

参数

assemblyName
AssemblyName

一个 AssemblyName 表示程序集名称的对象。

assemblySecurity
Evidence

加载程序集的证据。

args
String[]

启动进程时要传递的命令行参数。

返回

程序集入口点返回的值。

属性

例外

找不到由 assemblyName 该程序集指定的程序集。

找到指定的 assemblyName 程序集,但无法加载。

指定的 assemblyName 程序集不是当前加载的运行时的有效程序集。

在卸载的应用程序域中尝试此操作。

assemblySecurity 不是 null。 如果未启用旧 CAS 策略, assemblySecurity 应为 null

指定的程序集没有入口点。

注解

该方法 ExecuteAssemblyByName 提供与 ExecuteAssembly 该方法类似的功能,但按显示名称或 AssemblyName 文件位置指定程序集。 因此, ExecuteAssemblyByName 使用 Load 方法而不是方法 LoadFile 加载程序集。

程序集开始在 .NET Framework 标头中指定的入口点执行。

此方法不会创建新的进程或应用程序域,也不会在新线程上执行入口点方法。

注释

ExecuteAssemblyByName 该方法与参数一起使用 Evidence 时,将合并证据片段。 作为参数提供的证据片段取代 ExecuteAssemblyByName 加载程序提供的证据片段。

另请参阅

适用于

ExecuteAssemblyByName(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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

使用指定的证据和参数执行给定其显示名称的程序集。

public:
 int ExecuteAssemblyByName(System::String ^ assemblyName, System::Security::Policy::Evidence ^ assemblySecurity, ... cli::array <System::String ^> ^ args);
public int ExecuteAssemblyByName(string assemblyName, System.Security.Policy.Evidence assemblySecurity, params 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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public int ExecuteAssemblyByName(string assemblyName, System.Security.Policy.Evidence assemblySecurity, params string[] args);
member this.ExecuteAssemblyByName : 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 ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
member this.ExecuteAssemblyByName : string * System.Security.Policy.Evidence * string[] -> int
Public Function ExecuteAssemblyByName (assemblyName As String, assemblySecurity As Evidence, ParamArray args As String()) As Integer

参数

assemblyName
String

程序集的显示名称。 请参阅 FullName

assemblySecurity
Evidence

加载程序集的证据。

args
String[]

启动进程时要传递的命令行参数。

返回

程序集入口点返回的值。

属性

例外

assemblyNamenull

找不到由 assemblyName 该程序集指定的程序集。

找到指定的 assemblyName 程序集,但无法加载。

指定的 assemblyName 程序集不是当前加载的运行时的有效程序集。

在卸载的应用程序域中尝试此操作。

assemblySecurity 不是 null。 如果未启用旧 CAS 策略, assemblySecurity 应为 null

指定的程序集没有入口点。

注解

该方法 ExecuteAssemblyByName 提供与 ExecuteAssembly 该方法类似的功能,但按显示名称或 AssemblyName 文件位置指定程序集。 因此, ExecuteAssemblyByName 使用 Load 方法而不是方法 LoadFile 加载程序集。

程序集开始在 .NET Framework 标头中指定的入口点执行。

此方法不会创建新的进程或应用程序域,也不会在新线程上执行入口点方法。

注释

ExecuteAssemblyByName 该方法与参数一起使用 Evidence 时,将合并证据片段。 作为参数提供的证据片段取代 ExecuteAssemblyByName 加载程序提供的证据片段。

另请参阅

适用于