VB Migration Partner

KNOWLEDGE BASE - General


Previous | Index | Next 

[PRB] Conversion fails with a "Project item name not found" error

VB Migration Partner can convert only projects created with Visual Basic 6 and doesn’t support projects created with earlier versions. However, you should be aware that in some special (and rare) cases the conversion may fail if it is attempted on a project that was developed using a VB version earlier than VB6, even though it compiles correctly under VB6 and even if it was saved from inside the VB6 IDE. This article explains when this problem can occur.

Any form, class, or module that you create with VB6 contains a special hidden source code line that defines the name of the project item, as in this example:

        Attribute  VB_Name = "Module1"

The VB_Name attribute is always present when the project item is a class or a UserControl, but it might be missing if (a) the file is a form or a module that was created using an earlier VB version and then imported into VB6, and (b) you never modified and re-saved the file from inside the VB6 IDE. If these two conditions are met, the attribute is missing and VB Migration Partner fails with the following error message:

        Project item name  not found for file c:\foo.ctl

If the project item is a module or a class, however, VB Migration Partner tries to remedy by using the name found in the .vbp file. In this case it emits a warning (instead of a fatal error) which reads

        Project item name not found. Name 'foo'  assume for file c:\foobar.cls

This assumption is often correct and the migration can complete successfully. In a few cases, however – most notably, when the file is severely corrupted – the migration might fail later because code references to the class or module in question can’t be resolved. When this happens, please carefully review your VB code using an external editor (e.g. Notepad) to ensure that all name attributes are correctly set.

Previous | Index | Next 




Follow Francesco Balena on VB6 migration’s group on

LinkedIn





Read Microsoft Corp’s official case study of a VB6 conversion using VB Migration Partner.




Code Architects and its partners offers remote and onsite migration services.

More details




Subscribe to our free newsletter for useful VB6 migration tips and techniques.

newsletter



To learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report about your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET.

Get free advice



A fully-working, time-limited Trial Edition of VB Migration Partner allows you to test it against your actual code

Get the Trial




The price of VB Migration Partner depends on the size of the VB6 application, the type of license, and other factors

Request a quote




Migrating a VB6 application in 10 easy steps

Comparing VB Migration Partner with Upgrade Wizard

Migration tools: Feature Comparison Table

All whitepapers