BUG: RegisterAssembly cannot register a dynamic assembly (327131)
The information in this article applies to:
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft .NET Framework 1.0
- Microsoft .NET Framework 1.1
This article was previously published under Q327131 SYMPTOMS When you register a dynamically generated assembly by using
the System.Runtime.InteropServices.RegistrationServices.RegisterAssembly
method, you may receive the following error message: An
unhandled exception of type 'System.NotSupportedException' occurred in
mscorlib.dll
Additional information: The invoked member is not
supported in a dynamic assembly. CAUSE The problem occurs because RegisterAssembly calls GetRegistrableTypesInAssembly, which in turn calls GetExportedTypes on the Assembly instance. However, this type is an AssemblyBuilder, which derives from Assembly and then overrides GetExportedTypes to throw a NotSupportedException.RESOLUTION To work around this problem, save the dynamic assembly to a
file and then register it from the disk. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 9/14/2005 |
---|
Keywords: | kbvs2002sp1sweep kbbug kbCOMInterop kbpending KB327131 kbAudDeveloper |
---|
|