In this page we have gathered the most common cases of errors and problems you may
observe when using VB Migration Partner or when running migrated .NET projects.
1. Did you install all required software components?
When something isn’t working properly – for example, VB Migration Partner
stops with a fatal error or generates .NET source files that appear to be truncated
– you should double check that all components have been installed correctly
and that you are abiding by the terms of the EULA. More specifically, ensure that
you have installed the following applications on the computer on which you are attempting
the migration:
- Visual Basic 6
- All 3rd-party ActiveX controls and type libraries (IMPORTANT: the design-time
license for these controls must be installed.)
- Visual Basic Express or Visual Studio (2005, 2008, 2010, 2012 edition)
- VB Migration Partner (!)
Of course you should also ensure that you have registered and activated VB
Migration Partner on the computer on which you are attempting the migration. VB
Migration Partner must be installed using its companion setup procedure. Just copying
the files from a computer to another computer doesn’t work.
2. Did you install the most recent version of VB Migration Partner?
We routinely improve VB Migration Partner by adding new features and fixing bugs.
If you notice that VB Migration Partner doesn’t behave as it should, then:
- Download the most recent version of VB Migration Partner. (You can easily reach
this page by means of the Help-Download upgrades menu command).
- Uninstall VB Migration Partner, using Windows’ Control Panel.
- Install the new release you just downloaded
|
|
3. Has your VB Migration Partner license expired? [TRIAL EDITION ONLY]
If you notice that your VB Migration Partner Trial Edition is generating truncated
.NET source files, odds are that your trial period has expired.
In general, we provide a trial period that is long enough for you to test VB Migration
Partner and ascertain that it is able to convert the most critical portions of your
VB6 application. By the time when the trial period expires you should be able to
reach a decision about purchasing VB Migration Partner.
4. Did you correctly install VB Migration Partner’s patches?
If you had contacted Code Architects’ tech support, you might have received
from Code Architects one or more files meant to replace the ones that come with
the complete installation. In these cases it is essential that you backup all existing
files and replace all the involved files, including:
- The files that are located in VB Migration Partner’s setup folder
- The files that are located in the Support DLLs folder of migrated
projects
If the files you received are meant to fix a problem related to code generation,
you should re-migrate the VB6 project. By doing so you lose all the changes you
made on the generated .NET project, and for this reason we strongly recommend that
you apply all your fixes by means of pragmas, as opposed to editing the generated
.NET source files. Pragmas and our convert-test-fix methodology give you the ability
to repeatedly migrate the same VB6 project over and over – possibly with different
migration options or with newer, more powerful versions of VB Migration Partner
- without having to manually fix the generated code at each migration.
If you didn’t follow our recommendation and have manually edited the generated
code, when re-running VB Migration Partner on a VB6 project you already migrated,
the best you can do is:
- Re-migrate the same VB6 project, ensuring that you don’t overwrite the .NET
project you have already edited
- Use a file comparison utility – for example,
WinMerge – to compare the old and new version, so that you can manually
re-apply all the manual changes.
- Even better, instead of re-applying the manual changes in the generated code, go
back to the original VB6 project and add one or more
InsertStatement, ReplaceStatement,
or PostProcess pragmas
so that you’ll never need to manually edit the generated code.
5. Are you running VB Migration Partner in a virtual machine?
The EULA terms specify that you require the Site License in order to execute VB
Migration Partner in a virtual machine. If you find that VB Migration Partner truncates
the .NET source files it generates, ensure that VB Migration Partner isn’t
running in a virtual machine.
6. Are you running a single instance of VB Migration Partner from a local drive
and with administrative privileges?
VB Migration Partner hasn’t been designed in such a way that multiple instances
can run at the same time. If you experience random fatal errors, ensure that you
aren’t running another instance of VB Migration Partner in the background.
Besides, VB Migration Partner must run under full privileges, therefore you must
run it from a local drive and with administrative privileges (or equivalent).
This tip also applies to the VBMP.EXE utility used to perform migrations in batch
mode. Please read this article for more
information about how to run multiple instances of VB Migration Partner.
7. Does the VB6 project compile and run correctly?
VB Migration Partner requires that all the components that the VB6 projects require
– both at compilation time and at runtime – be installed on the computer
on which you are attempting the migration. The simplest way to meet this requirement
is ensuring that the VB6 project compiles and runs without errors on the computer
on which you are attempting the migration.
If you are converting a project group, ensure that it compiles correctly as a whole,
by means of the File-Make Project Group menu command in the VB6 IDE.
|
|
8. Have you modified the .NET code after the migration? [TRIAL EDITION
ONLY]
Here’s the scenario: you have used VB Migration Partner Trial Edition to generate
a .NET project; the .NET project runs fine but doesn’t seem to react to keyboard
or mouse actions.
The reason for this behavior is that you modified the generated .NET project in
ways that aren’t permitted by VB Migration Partner Trial Edition’s EULA.
Such unpermitted changes include – but aren’t limited to - adding forms,
classes, modules, and structures. When you edit the generated code in this way,
all events cease to be fired.
You can easily confirm that events aren’t firing by loading the generated
project inside Visual Studio and placing a breakpoint in the method that handles
an event that must be fired, for example the handler for the Load event of the main
form. If the breakpoint is never encountered, then it’s an evidence that the
event isn’t fired.
The only solution for this problem is that you undo all your unpermitted changes.
Or that you purchase a full license of VB Migration Partner.
9. Did you check VB Migration Partner’s activity log?
If VB Migration Partner isn’t working correctly, the first step to take is
checking the contents of its Activity Log window, which reports both informational
and error messages emitted during the migration process. (Error messages are can
be easily spotted because they are tagged with a red icon.)
In most cases, the error messages in this window are self-explanatory and can reveal
the cause of the malfunctioning and its solution.
10. Are you running the .NET project on the same computer where you migrated
it?
In some cases, the .NET project created by VB Migration Partner depends on one or
more COM components. The list of these COM components includes:
- The following ActiveX MSDATGRD.OCX, MSHFLXGD.OCX, MSCHRT20.OCX, MCI32.OCX,
MSCAL.OCX, MSWINSCK.OCX (if referenced by the original VB6 project)
- The following type libraries: DAO.dll, InetCtlsObjects.dll, MSCommLib.dll, msdatasrc.dll,
MSMAPI.dll, MSScriptControl.dll, RDO.dll (if referenced by the original VB6 project)
- The VBSupportLib.dll and the msvbvm60.dll file – only if the original
VB6 project uses the Printer object, the Print common dialog, or the Winsock control
If the generated .NET project works well on the computer where VB Migration Partner
is installed but not on another computer, make it sure that you correctly installed
and registered the COM components.
11. Did you search VB Migration Partner’s knowledge base?
Half the queries our tech support team receives each day could be solved by simply
searching our ever-growing knowledge base. As of this writing there are over 250
distinct KB articles available on our web site, and we add new articles virtually
each day.
If you experience a weird behavior – either during the migration or when running
the migrated .NET project – your first step should be searching our
documentation by means of our Google-powered search engine. In most cases, it’s
just a matter of typing the right search keyword. Here are some hints:
- If you have a compilation error or a runtime exception, search for the error’s
message
- If you have problems with a control, component or method, search for the control
or method’s name (e.g. “TextBox” or “MsgBox”)
- If the migrated .NET project doesn’t behave exactly like the original VB6
code, try searching for “minor differences” or “equivalence”
|
|
Please notice that the knowledge base you can search online is the same KB that
our tech support team queries when one of our customers submits a query. By searching
the KB yourself you can often save both your and our time, and solve the problem
in a matter of minutes.
12. Were all ActiveX controls and type libraries correctly installed?
If VB Migration Partner’s Activity Log window includes one or more messages
that read “Unable to convert XXXX type library” (or similar), then you
should check that
- All the ActiveX controls and type libraries have been correctly installed on the
computer on which you are attempting the migration. (In doubt, use the RegSvr32
utility to reinstall them.)
- The major and minor version number of the control/typelib is the same among all
the VB6 projects being migrated.
- Their path matches the path found in the .vbp file of the VB6 project being converted.
IMPORTANT: it is essential that you have installed the design-time
license of all the ActiveX controls used by the application being migrated;
installing just the runtime license isn’t enough. The easiest way to check
that you have installed the design-time license is loading the VB6 project inside
the VB6 IDE and compiling it.
In most cases, VB Migration Partner is able to convert VB6 projects even if their
.vbp file contains one or more invalid paths, yet in some circumstances VB Migration
Partner may fail to guess it correctly. If in doubt, just reload the VB6 project
inside the VB6 IDE, make a minor edit to any source file (for example, insert a
space at the end of a code line), and then save the project: this action typically
forces the VB6 IDE to re-evaluate the correct path for all controls and type libraries.
13. Are you sure the original Visual Basic project was updated to VB6?
Some VB6 business applications were initially coded in VB4 or VB5. In some cases,
these applications – or at least some of their constituent projects - were
just recompiled under VB6 but were never really converted to VB6 and their
source files still contain leftovers from VB4 or VB5, for example attributes that
VB6 doesn’t support any longer. These attributes are hidden and aren’t
visible from inside the VB6 IDE, yet they can prevent VB Migration Partner from
correctly migrating the application.
If you suspect that your VB6 project is still using unsupported hidden attributes,
just follow this procedure:
- Load the project inside the VB6 IDE
- Make a minor change to each source file in the project (Tip: you can
just add an empty line at the end of the file)
- Save the entire project
14. Did you clear VB Migration Partner’s type library cache?
VB Migration Partner creates a special area on your hard disk, known as type library
cache. This area is used to store the result of the analysis of ActiveX
controls and type libraries used by the project being migrated, so that subsequent
migrations can run faster.
In some cases, however, the Type Library Cache may become out-of-sync and you should
clear it and start again with an empty cache. The easiest way to clean it up is
enabling the “Clear type library cache when VB Migration Partner starts”
option, in the General tab of the Tools-Options dialog box, then closing and restarting
VB Migration Partner.
After you have cleaned up the type library cache, you might want to disable that
option, so that subsequent migrations can run as fast as possible.
15. Did you insert your pragmas correctly?
VB Migration Partner’s pragmas are just special VB6 remarks. As such, they
should be inserted only where a VB6 remark can be inserted. For example:
- You cannot insert a pragma at the very top of a VB6 file, because the first line
is usually reserved by VB6 to identify the file type (form, class, module, etc.)
- You cannot insert a pragma inside a form or UserControl’s definition area
– i.e. the area in the .frm or .ctl file used to define the form and its controls’
properties.
- You cannot insert a pragma in the middle of multiline VB6 statement.
If you are in doubt, just insert the pragma from inside the VB6 IDE instead of using
VB Migration Partner’s integrated code editor. The sequence for doing so is
quite simple:
- build the pragma using VB Migration Partner’s Edit-Insert Pragma menu command
- click the Copy button to copy the pragma’s text in the clipboard
- switch to the VB6 IDE and paste the pragma where appropriate
Also, keep in mind that if a pragma has an incorrect syntax you should find an error
message in the Activity Log window, at the end of the migration process.
16. Did you try the “Explain Errors and Warnings” command?
If the migration completed correctly but you are puzzled by the many error and warnings
messages found in VB Migration Partner’s lower pane, you should run the Tools-Explain
Errors and Warnings menu command. This command brings you to a page that summarizes
and explains all the messages in your migrated code and recommends a strategy to
solve them.
You need an active Internet connection to run this command.
|
|
17. Still annoyed by the “One or more compiled files of the selected solution
aren’t up-to-date with the source code” message?
When you start a conversion, VB Migration Partner compares the timestamp of the
VB6 executable file – be it an EXE, DLL, or OCX file – with the timestamp
of all the source files that are part of the project being migrated. If any source
file is newer than the executable file, VB Migration Partner displays the dialog
box in question.
Some users complain that this dialog box appears even if they have compiled the
VB6 project from inside the VB6 IDE, an action that is supposed to save all files
before the actual compilation takes places. However, this isn’t correct, because
the VB6 IDE compiles the source files in memory, without having to save them to
disk.
Additionally, in some cases the compilation process flags the VBP file as “dirty”,
therefore this file is automatically updated when you exit the VB6 IDE or you issue
the File-Save Project menu command. As a result, the VBP file appears to be newer
than the executable file.
The only way to ensure that all VB6 source files are up-to-date is
- Edit all VB6 source files as required
- Use the File-Save Project menu command to save all edits to disk
- Compile the VB6 project or project group from inside the VB6 IDE
- Exit the VB6 IDE – if a dialog box appears and informs you that the VBP file
needs to be saved then cancel the exit operation and repeat steps B-C-D.
18. Did you create a sample project that reproduces the problem?
If you are trying to solve a problem that occurs either during the migration process
or when you run the migrated .NET project, it is essential that you provide a self-contained
VB6 sample project that allows our tech support team to reproduce the issue.
Without such a sample project we might unable to work on your problem and offer
you the solution.
We understand that creating a sample project can take some time; however, please
bear in mind that if you don’t prepare such a sample project, we have to do
it anyway. In some cases we might not have enough information to create the sample
and reproduce the problem.
Also, if preparing the sample requires a lot of time, we must give your request
a lower priority, so that we can focus on other requests that were accompanied by
a complete sample.
When preparing a complete sample, remember to include:
- A complete VB6 project that reproduces the error
- All the 3rd-party libraries that are referenced by the VB6 project. (You don’t
need to send libraries that come with VB6 or with Windows, e.g. DAO and ADODB libraries.)
- All the 3rd-party controls that are used by the VB6 project.
- The .NET project you obtained from VB Migration Partner (if the problem occurs
at runtime).
- An exhaustive description of how to reproduce the problem (if the problem occurs
at runtime).
Please help us provide you the best tech support.