BUG: You receive an "Unexpected exception occurred during upgrade engine operation" error message when you run the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard (819350)



The information in this article applies to:

  • Microsoft Visual Basic 2005
  • Microsoft Visual Basic .NET (2003)
  • Microsoft Visual Basic .NET (2002)

SYMPTOMS

When you run the Microsoft Visual Basic .NET or Microsoft Visual Basic 2005 Upgrade Wizard to upgrade your Microsoft Visual Basic 6.0 projects, you may receive the following error message:

Unexpected exception occurred during upgrade engine operation: Object is static; operation not allowed.

CAUSE

You can use double-byte character set (DBCS) characters to name your Visual Basic 6.0 files and to name your Visual Basic 6.0 projects. You can also use DBCS characters to name the folders that contain your Visual Basic 6.0 files and to name the folders that contain your Visual Basic 6.0 projects. You can then run the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard to upgrade these projects.

You receive the error message that is mentioned in the "Symptoms" section of this article if you use DBCS characters with 0x5b or 0x5c trailing bytes to name your Visual Basic 6.0 files, to name your Visual Basic 6.0 projects, or to name your Visual Basic 6.0 folders. You receive the error message because the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard incorrectly interprets the trailing bytes of these DBCS characters as the '[' (0x5b) single-byte character set (SBCS) character and the '\' (0x5c) SBCS character. Therefore, the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard expects files, projects, or folders with names that contain these SBCS characters. However, these files, projects, or folders only contain DBCS characters, so you receive the error message.

WORKAROUND

To work around this bug, use names that do not contain DBCS characters with 0x5b or 0x5c trailing bytes to rename your Visual Basic 6.0 files, to rename your Visual Basic 6.0 projects, and to rename the folders that contain these files and projects. Use other DBCS characters or valid SBCS characters instead. Next, run the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard. You can successfully upgrade your Visual Basic 6.0 projects to Visual Basic .NET or Visual Basic 2005 projects.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Start Visual Basic 6.0.
  2. On the File menu, click New Project.
  3. Click Standard EXE, and then click OK.

    By default, Form1 is created.
  4. On the File menu, click Save Project.
  5. In the Save File As dialog box, select a convenient path to save your project in, and then click Save.

    Form1.frm is created.
  6. In the Save Project As dialog box, click Save. Click No if the Source Code Control dialog box is displayed.

    Project1.vbp is created.
  7. Start Microsoft Windows Explorer.
  8. Locate the folder where you saved Form1.frm and Project1.vbp in step 5 and in step 6.
  9. Rename the folder that contains Form1.frm and Project1.vbp with a name that contains a DBCS character that has 0x5b or 0x5c as the trailing byte.
  10. Start Microsoft Visual Studio .NET or Microsoft Visual Studio 2005.
  11. On the File menu, point to Open, and then click Project.
  12. Locate and then click the Project1.vbp file that you created in step 6.
  13. Click Open to display page 1 of the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard.
  14. Click Next on page 1, click Next on page 2, and then click Next on page 3 of the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard. Click Yes when you are prompted to create a new folder.
  15. Click Next on page 4 of the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard to display page 5 of the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard.

    You receive the error message that is mentioned in the "Symptoms" section of this article.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web site:For more information about upgrading Visual Basic 6.0 applications to Visual Basic .NET and Visual Basic 2005, visit the following MSDN Web site::

Modification Type:MinorLast Reviewed:10/3/2006
Keywords:kbvs2005swept kbvs2005applies kbvs2002sp1sweep kbwizard kbDBCS kbSysSettings kbLocalization kbUpgrade kbMigration kbmigrate kberrmsg kbbug KB819350 kbAudDeveloper