Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

Migrating VB Project (which are using .tlb references) to VB.NET (yellow exclamation mark error in references)

, 3 May 2012
Rate this:
Please Sign up or sign in to vote.
Migration of a VB project which is using .tlb refrences, to VB.NET

Introduction

It is a very common problem faced by developers working on VB to VB.NET migration project. If VB6 project is using some DLLs which are further referencing .TLBs (type libraries), then this VB6 project cannot directly be migrated to VB.NET using upgrade wizard. It will not create InterOps for those DLLs which are using .TLBs.

Background

While working on a migration project, I faced an issue that I was not able to add a DLL reference to my converted (from VB6 to VB.NET) .NET solution. Ideally conversion wizard automatically makes the InterOps for the DLLs being referred in VB6 project. In my case, it was showing that DLL in my solution but a yellow exclamation mark on it.

Steps

In order to resolve this issue, one can follow the steps given below:

  1. Check for the references in your VB6 project and note down the .tlb references and their locations.
  2. Go to the location "C:\WINDOWS\system32\URTTEMP" at command prompt and execute "regtlib.exe" along with the .tlb name with full path.
    e.g. C:\WINDOWS\system32\URTTEMP>regtlib C:\TestFolder\test.tlb
    In the above example, my .tlb file name is test.tlb and placed at location "C:\TestFolder". This command will register the .tlb file
  3. Recompile your VB6 DLL.
  4. Now add the reference of this newly compiled DLL into your VB.NET solution.

It will now create the InterOp for your VB6 DLL automatically.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

AshishSaxena19
Product Manager
India India
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 3 May 2012
Article Copyright 2012 by AshishSaxena19
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid