VB Migration Partner


Previous | Index | Next 

[PRB] Structures with same name may be generated in the same .NET namespace

Two or more public Type…End Type blocks with same name may coexist in a VB6 application, provided that they are defined in different BAS modules. When these Type blocks are converted to .NET, however, they cause a compilation error because .NET requires that all project-level symbols have a unique name. For each duplicated Type block you’ll get a message similar to this one:

        structure 'XYZ' and structure 'XYZ', declared in 'filename.vb', 
        conflict in namespace 'namespace_name'.

VB Migration Partner doesn’t solve this error automatically and requires that you fix it manually by editing the VB6 code. This fix is usually a no-brainer, because if a VB6 project contains multiple Type blocks with same name, these blocks can be accessed only from inside the module where they are defined. (Any attempt to access them from a different module causes an ambiguous name compilation error in VB6.) For this reason you just need to change the scope of all Type blocks with same name from Public to Private.

Previous | Index | Next 

Follow Francesco Balena on VB6 migration’s group on


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.


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