Article ID: 317157 - Last Review: August 23, 2005 - Revision: 5.6 PRB: Errors When You Reference the Access 10.0 Type Library with Visual Studio .NETThis article was previously published under Q317157 On This PageSYMPTOMS
When you add a reference to the Access 10.0 object library to create a COM interop assembly, you may receive the following error message:
A reference to 'Microsoft Access 10.0 Object Library' could not be added. Converting the type library to a .NET assembly failed. A dependent type library 'OWC10' could not be converted to a .NET assembly. A dependent type library 'ADODB' could not be converted to a .NET assembly. Item has already been added.
When you use the Type Library Importer tool, Tlbimp.exe, to create a COM interop assembly for the Access 10.0 object library, you may receive the following error message:
TlbImp error: System.ApplicationException - The assembly for referenced type library, 'ADODB', will not be imported since it would overwrite existing assembly 'ADODB'.
CAUSE
When you set a reference to a COM object library, you must create and reference a COM interop assembly for each of the dependent object libraries. The Access 10.0 object library is dependent on Microsoft ActiveX Data Objects (ADO) 2.5 and the Microsoft Office XP Web Components. The Office XP Web Components are dependent on ADO 2.1. A conflict occurs when Visual Studio .NET attempts to create the COM interop assembly for ADO 2.1 by using the Adodb.dll file name. Because an assembly with this name has already been created for ADO 2.5, Visual Studio does not overwrite the file and reports the error.
RESOLUTION
To resolve this problem, manually create a COM interop assembly for the Access 10.0 object library, and then set a reference to the assembly.
Create a COM Interop Assembly for the Access 10.0 Object LibraryNOTE: The file paths that are used in the sample commands are for default installations. The file paths on your computer may be different.
Reference the COM Interop Assembly
STATUS
This behavior is by design.
MORE INFORMATIONSteps to Reproduce the Behavior
REFERENCESFor additional information about late binding, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
304661
(http://support.microsoft.com/kb/304661/EN-US/
)
HOWTO: Binding for Office Automation Servers with Visual Basic .NET
302902
(http://support.microsoft.com/kb/302902/EN-US/
)
HOWTO: Binding for Office Automation Servers with Visual C# .NET
For more information about Office Automation, see the following Microsoft Web site:
Office Development Support Center http://support.microsoft.com/ofd (http://support.microsoft.com/ofd) APPLIES TO
| Article Translations
|
Back to the top
