Article ID: 316163 - View products that this article applies to.
This article was previously published under Q316163
When you attempt to build a Class Library project in Visual Basic .NET 2002, and the project exposes a Collection type through Component Object Model (COM) interop, the build may fail with the following error message:
In Visual Basic .NET 2003, you receive the following error message:
COM Interop registration failed. Error loading type library/DLL.
In Visual Basic 2005, you receive the following error messagess:
COM Interop registration failed. Could not find a type library for assembly 'Microsoft.VisualBasic'.
error MSB3211:The assembly 'Microsoft.VisualBasic, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not registered for COM Interop. Please register it with regasm.exe /tlb.
error MSB3212: Error: Error loading type library/DLL.
This behavior occurs because the Collection type is defined in the Microsoft.VisualBasic.dll assembly. If the type library for Microsoft.VisualBasic.dll is not registered, the class library cannot be registered correctly.
To resolve this issue, follow these steps:
Steps to Reproduce the Problem
Article ID: 316163 - Last Review: February 12, 2007 - Revision: 2.1