This documentation is archived and is not being maintained.

Assembly.ReflectionOnlyLoad Method (Byte[])

Note: This method is new in the .NET Framework version 2.0.

Loads the assembly from a Common Object File Format (COFF)-based image containing an emitted assembly. The assembly is loaded into the reflection-only context of the caller's application domain.

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)

public static Assembly ReflectionOnlyLoad (
	byte[] rawAssembly
public static Assembly ReflectionOnlyLoad (
	byte[] rawAssembly
public static function ReflectionOnlyLoad (
	rawAssembly : byte[]
) : Assembly



An array of type byte that is a COFF-based image containing an emitted assembly.

Return Value

An Assembly object that represents the loaded assembly.

Exception typeCondition


rawAssembly is a null reference (Nothing in Visual Basic).


rawAssembly is not a valid assembly.


rawAssembly cannot be loaded.

You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the Load method.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0