Microsoft KB Archive/819350

= BUG: You receive an &quot;Unexpected exception occurred during upgrade engine operation&quot; error message when you run the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard =

Article ID: 819350

Article Last Modified on 11/26/2007

-

APPLIES TO


 * Microsoft Visual Basic 2005
 * Microsoft Visual Basic .NET 2003 Standard Edition
 * Microsoft Visual Basic .NET 2002 Standard Edition

-





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 &quot;Symptoms&quot; 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.



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.
 * 1) On the File menu, click Save Project.
 * 2) In the Save File As dialog box, select a convenient path to save your project in, and then click Save.

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

Project1.vbp is created.
 * 1) Start Microsoft Windows Explorer.
 * 2) Locate the folder where you saved Form1.frm and Project1.vbp in step 5 and in step 6.
 * 3) 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.
 * 4) Start Microsoft Visual Studio .NET or Microsoft Visual Studio 2005.
 * 5) On the File menu, point to Open, and then click Project.
 * 6) Locate and then click the Project1.vbp file that you created in step 6.
 * 7) Click Open to display page 1 of the Visual Basic .NET or Visual Basic 2005 Upgrade Wizard.
 * 8) 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.
 * 9) 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 &quot;Symptoms&quot; section of this article.

