Previous | Index | Next 

[HOWTO] Execute multiple instances of VB Migration Partner

When migrating very large applications that consist of many distinct VB6 projects using the batch version of VB Migration Partner, it can be convenient to launch multiple instances of VBMP.exe. When doing so, however, spurious errors can occur during the migration. In most cases, these errors are caused by the locks that VB Migration Partner puts on the DLLs it uses, most notably the DLLs that are installed in VB Migration Partner’s install folder and the DLLs in the type library cache.

To avoid these errors you should perform the following two steps:

1) Create multiple folders for VB Migration Partner executables
For example, if you plan to run four instances of VBMP.exe in parallel, you should create three additional folders anywhere on your hard disk (for example, c:\vbmp2, c:\vbmp3, and c:\vbmp4) and copy into these folders all the files found in VB Migration Partner’s install folder.

2) Edit the TlbCachePath setting in VBMigrationPartner.exe.config
It is essential that each running instance uses a distinct type library cache. To do so, locate the following portion of the VBMigrationPartner.exe.config file (in the <applicationSettings> section):

        <setting  name="TlbCachePath" serializeAs="String">
            <value />

and modify it so that each instance points to a different path on your hard disk. For example, the configuration file in c:\vbmp2 might point to c:\vbmp2\tlbcache, the configuration file in c:\vbmp3 might point to c:\vbmp3\tlbcache, and so forth:

        <setting name="TlbCachePath" serializeAs="String">

3) Edit the FailOnErrors setting in VBMigrationPartner.exe.config (optional)
While it isn’t mandatory, editing the FailOnErrors setting in each configuration file is usually a good idea when migrating large applications that consist of many distinct VB6 projects. For example, terminating a migration process if a type library can’t be imported correctly saves you time and ensures that you don’t attempt the migration of more projects that use the .NET project that failed to migrate correctly. For more information, read this KB article.


Previous | Index | Next