AppDomain.ExecuteAssembly Method (String, Evidence, String)
Executes the assembly contained in the specified file, using the specified evidence and arguments.
Assembly: mscorlib (in mscorlib.dll)
public final function ExecuteAssembly( assemblyFile : String, assemblySecurity : Evidence, args : String ) : int
- Type: System.String
The name of the file that contains the assembly to execute.
- Type: System.Security.Policy.Evidence
The supplied evidence for the assembly.
- Type: System.String
The arguments to the entry point of the assembly.
Return ValueType: System.Int32
The value returned by the entry point of the assembly.
Implements_AppDomain.ExecuteAssembly(String, Evidence, String)
assemblyFile is a null reference (Nothing in Visual Basic).
assemblyFile is not found.
assemblyFile is not a valid assembly.
Version 2.0 or later of the common language runtime is currently loaded and assemblyFile was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
The specified assembly has no entry point.
The assembly begins executing at the entry point specified in the .NET Framework header.
This method does not create a new process or application domain, and it does not execute the entry point method on a new thread.
Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows CE Platform Note: Loading assemblies into a domain neutral code area for use by multiple application domains is not supported.
to load an assembly with evidence. Associated enumeration: SecurityPermissionFlag.ControlEvidence.
for reading a URI that does not begin with "file://".
to execute a console application. Associated enumeration: PermissionState.Unrestricted.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.