AppDomain.ExecuteAssembly Method (String)
Executes the assembly contained in the specified file.
Assembly: mscorlib (in mscorlib.dll)
abstract ExecuteAssembly : assemblyFile:string -> int override ExecuteAssembly : assemblyFile:string -> int
- Type: System.String
The name of the file that contains the assembly to execute.
Return ValueType: System.Int32
The value returned by the entry point of the assembly.
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.
for reading a URI that does not begin with "file://".
to execute a console application. Associated enumeration: PermissionState.Unrestricted.