VB Migration Partner

KNOWLEDGE BASE - General


Previous | Index | Next 

[HOWTO] Terminate the migration when a warning message is emitted

Starting with VB Migration Partner 1.10 it is possible to abort a migration process beforehand, when a given warning or exception message appears in the Activity Log window (when using the GUI version) or in the command window (when using the batch version). Notice that these warnings are distinct from those that are inserted in the generated .NET code.

Terminating the migration when a given warning or error occurs is possible by editing the FailOnErrors value that you can find <applicationSettings> section of the VBMigrationPartner.exe.config file. Usually this section looks like this:

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

All the warnings have a category ID in the form “Fxx4”, whereas all errors have a category ID in the form “Fxx8”; in both cases “xx” are two hexadecimal digits. For example, the F014 is the warning output when the project isn’t up-to-date, whereas F148 is the error that occurs when VB Migration Partner isn’t able to generate a COM Interop assembly from one of the type libraries referenced by the VB6 project being migrated.

The value of the FailOnErrors setting is a regex that is applied against the category ID. For example, the following setting in VBMigrationPartner.exe.config causes the migration to terminate immediately when any error occurs:

        <setting name="FailOnErrors" serializeAs="String">
            <value>F..8</value>
        </setting>

whereas the following value stops the migration when any error occurs and when the project isn’t up-to-date:

        <setting name="FailOnErrors" serializeAs="String">
            <value>F014|F..8</value>
        </setting>

If a batch migration terminates beforehand because of FailOnErrors setting, the VBMP.EXE program exits with ErrorLevel equal to 99.

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