Microsoft KB Archive/839293

= BUG: IntelliSense feature stops functioning when you switch from Designer view to Code view =

Article ID: 839293

Article Last Modified on 5/18/2007

-

APPLIES TO


 * Microsoft Visual C# .NET 2003 Standard Edition
 * Microsoft .NET Framework 1.1
 * Microsoft Visual Basic .NET 2003 Standard Edition

-





SUMMARY
When you use License controls in Microsoft Visual C# .NET 2003, and you switch to Code view after you make some changes to a form or a control in Designer view, the Microsoft IntelliSense feature may stop functioning. This article describes how to resolve the problem by deleting extra blank lines from the licenses.licx file of the project that are incorrectly added by the Microsoft Visual Studio .NET 2003 IDE.



SYMPTOMS
The IntelliSense feature may stop functioning when you make some changes in Designer view, and then you switch to Code view. Color syntax highlighting in the Code view disappears except for the #region directive and comments.

You may notice this behavior when you use License controls in your project.



CAUSE
When you use the License controls in your project, the licenses.licx file is automatically generated. There may be some blank lines in the licences.licx file that are incorrectly added. These blank lines cause a part of the Language service code to fail, and this behavior causes the CodeSense feature of IntelliSense to disappear.



RESOLUTION
To resolve this problem, follow these steps:
 * 1) Start Visual Studio .NET 2003.
 * 2) On the File menu, click Open Solution, and then locate the solution file where the problem occurs.
 * 3) On the File menu, point to Open, and then click File.
 * 4) Locate the project folder in the Open File dialog box, and then double-click licenses.licx.
 * 5) In the Code window, remove all the blank lines from the end of the type name line in the licenses.licx file by pressing the DELETE key on your keyboard.
 * 6) On the File menu, click Save All to save all the files.
 * 7) Restart Visual Studio .NET, and then open the project again.



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



Steps to reproduce the behavior

 * 1) Start Visual Studio .NET 2003.
 * 2) On the File menu, point to New, and then click Project.
 * 3) Under Project Types, click Visual C# Projects, and then click Windows Application under Templates.
 * 4) In the Name box, type MyLicensedControlProject, and then click OK.
 * 5) On the View menu, click Toolbox.
 * 6) Right-click the toolbox, and then click Add/Remove Items.
 * 7) In the Customize Toolbox dialog box, click the .NET Framework Components tab.
 * 8) Click Browse, and then locate the following path of a sample license control:

\Microsoft Visual Studio .NET 2003\SDK\v1.1\QuickStart\winforms\samples\writingcontrols\licensedcontrol\cs

Note  is a placeholder for the path where Microsoft Visual Studio .NET 2003 is installed.
 * 1) Click LicensedControl.DLL, click Open, and then click OK. The LicensedControl control appears under My User Controls in the toolbox.
 * 2) Double-click LicensedControl in the toolbox.

The licensedControl1 licensed control is added to the form, and Visual Studio .NET automatically generates the licenses.licx file under the \MyLicensedControlProject folder.

Note  is a placeholder for the path where the project that is named MyLicensedControlProject is created.
 * 1) On the File menu, point to Open, and then click File.
 * 2) In the Open File dialog box, locate the project folder, and then double-click licenses.licx.
 * 3) In the Code window, add three or four blank lines to the end of the type name line in the licenses.licx file.
 * 4) On the File menu, click Save All to save all the files.
 * 5) Restart Visual Studio .NET, and then open the project again.
 * 6) Make some changes in Designer view, and then switch to Code view.

You notice the problem that is mentioned in the &quot;Symptoms&quot; section.

