This documentation is archived and is not being maintained.

RegistrationServices.UnregisterAssembly Method

Unregisters the classes in a managed assembly.

[Visual Basic]
Public Overridable Function UnregisterAssembly( _
   ByVal assembly As Assembly _
) As Boolean Implements IRegistrationServices.UnregisterAssembly
public virtual bool UnregisterAssembly(
 Assembly assembly
public: virtual bool UnregisterAssembly(
 Assembly* assembly
public function UnregisterAssembly(
   assembly : Assembly
) : Boolean;


The assembly to be unregistered.

Return Value

true if assembly contains types that were successfully unregistered; otherwise false if the assembly contains no eligible types.




Exception Type Condition
ArgumentNullException assembly is a null reference (Nothing in Visual Basic).
InvalidOperationException The full name of assembly is a null reference (Nothing in Visual Basic).


A method marked with ComUnregisterFunctionAttribute is not static (Shared in Visual Basic) .


There is more than one method marked with ComUnregisterFunctionAttribute at a given level of the hierarchy.


The signature of the method marked with ComUnregisterFunctionAttribute is not valid.


UnregisterAssembly removes the registry entries for the types in the specified assembly previously added by RegisterAssembly. This method also calls any unregistration functions found in the assembly.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

RegistrationServices Class | RegistrationServices Members | System.Runtime.InteropServices Namespace