Microsoft KB Archive/313509

= BUG: UPGRADE comments overload the task list in Visual Basic .NET or in Visual Basic 2005 after the Upgrade Wizard runs =

Article ID: 313509

Article Last Modified on 12/6/2006

-

APPLIES TO


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

-



This article was previously published under Q313509



SYMPTOMS
Your system may stop responding under the following circumstances:
 * You upgrade a Microsoft Visual Basic 6.0 project to Visual Basic .NET or Visual Basic 2005 by using the Upgrade Wizard.
 * The upgrade generates a significant number of items in your TODO list.
 * You try to remove an item from the TODO list by deleting the code comments that are associated with that item.

NOTE: Although this problem is unlikely to occur under other circumstances, this problem is not limited to projects that have been upgraded. If you manually add a significant number of TODO comments, you may experience the same problem.



CAUSE
When you upgrade your project from Visual Basic 6.0 to Visual Basic .NET or Visual Basic 2005, the Upgrade Wizard may generate a significant number of TODO or UPGRADE comments. Whenever you address or remove one of these comments, the Task List is updated.

Note The Visual Basic .NET Upgrade Wizard is included in Visual Studio .NET Professional.

However, when the list of comments in the Task List increases, updates to the TODO list take more time. While Microsoft Visual Studio .NET or Microsoft Visual Studio 2005 is updating the Task List, the cursor changes to an hourglass, and the application may stop responding depending on the computer and the size of the Task List.



RESOLUTION
To work around this problem, use one of the following methods.

Method 1: Temporarily Change the BuildAction Property

 * 1) In Solution Explorer, right-click the file that you are editing, and then change the value of the BuildAction property to None. This removes all of the entries for this file from the Task List.
 * 2) Remove all of the UPGRADE comments while the file is migrated.
 * 3) After you have removed most of the comments, change the value of the BuildAction property back to Compile.
 * 4) Repeat steps 1 through 3 for each file in your project until the number of UPGRADE comments is reduced to a manageable number (that is, less than 1,000 or 2,000 comments).

Note Make sure that you set the value of the BuildAction property back to Compile (or the original setting) for all of the files so that the project builds correctly.

Method 2: Temporarily Remove Tokens from Task List
 On the Tools menu, click Options. In the left pane of the Options dialog box, click Task List under the Environment folder. Notice that the Token list box includes the UPGRADE tokens (UPGRADE_ISSUE, UPGRADE_TODO, UPGRADE_WARNING). Click each of the UPGRADE tokens, and then click Delete to remove these tokens from the Task List. Address all of the UPGRADE comments for all of the files in your project, and then remove the comments from the files. After you remove most of the UPGRADE comments from the files in your project, follow these steps to add the UPGRADE tokens back to the Task List to locate the remaining UPGRADE comments:  On the Tools menu, click Options.</li> In the left pane of the Options dialog box, click Task List under the Environment folder.</li> In the Name text box under Comment Tokens, type UPGRADE_ISSUE, and then click Add.</li> Repeat step 5c for the UPGRADE_TODO and the UPGRADE_WARNING tokens.</li> Click OK to close the Options dialog box.</li></ol> </li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
When the Upgrade Wizard moves through the code, the wizard may find items that you must manually migrate or check. The wizard inserts a comment before each portion of code that you must check. These comments include the UPGRADE_ISSUE, the UPGRADE_TODO, and/or the UPGRADE_WARNING tokens. These comments are logged in the Task List.

Steps to Reproduce Behavior
<ol> In Visual Basic .NET or inVisual Basic 2005, open a large Visual Basic 6.0 application that contains 25 or more modules.</li> The Upgrade Wizard starts by default. Complete the steps in the Upgrade Wizard.

Note You can also open the Upgrade Wizard from a command prompt. This installs the Upgrade Wizard in the following folder:

\VB7\VBUpgrade

Note You can also start the Upgrade Wizard from a command prompt. When you do this, the Upgrade Wizard is installed in the following folder:

\VB\VBUpgrade

</li> Notice that your Visual Basic .NET or Visual Basic 2005 project includes thousands of entries in the Task List. Open any of the files in your Visual Basic .NET or Visual Basic 2005 project, and then try to remove one of the comments that contain the UPGRADE_ISSUE, the UPGRADE_TODO, or the UPGRADE_WARNING token. Notice how long the Task List takes to update.</li></ol>

<div class="references_section">