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.