Microsoft KB Archive/814910

From BetaArchive Wiki

Article ID: 814910

Article Last Modified on 1/18/2006



APPLIES TO

  • Microsoft Visual C# .NET 2002 Standard Edition



SYMPTOMS

When you use uppercase characters from a different language in a file name in Visual C# .NET, you may receive multiple errors. When you rename a file to include characters from a different language, and you open these files in an editor, you receive the following warning message when you compile the file:

Source file 'filename' specified multiple times

Also, you may find that you cannot navigate, outline, add color, use the code model, use Microsoft IntelliSense, or load the designer. The following problems also occur:

  • The source file loses color.
  • The debugger prompts the user to open the file before each breakpoint, and after each time the user steps, even if the file is already open.
  • Breakpoints are not displayed while debugging, but are hit.
  • You receive the CS2002 compiler warning.


WORKAROUND

To work around problems such as the loss of colorization, navigation, code model, or Intellisense, close the file in the editor, and then reopen the file. When you do this, all services are restored.

To work around debugging problems, change the file name after you close the file in the editor.

STATUS

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

MORE INFORMATION

The following are problems that you may experience:

  • Navigation features that do not function correctly when you double-click the error in the Task List
  • Debugging problems
  • Compiler warnings

Steps to Reproduce the Behavior

Navigation Features That Do Not Function Correctly When You Double-Click the Error in the Task List

  1. Set System locale to Turkish.
    To do this in Microsoft Windows XP, follow these steps:
    1. In Control Panel, click Date, Time, Language, and Regional Options, and then click Regional and Language Options.
    2. In the Regional and Language Options dialog box, click the Advanced tab.
    3. Under Language for non-Unicode programs, select Turkish from the list.


    To do this in Microsoft Windows 2000 Advanced Server, follow these steps:

    1. In Control Panel, double-click Regional Options.
    2. On the General tab, select Turkish from the your locale (location): list. If you cannot find Turkish, click to select the Turkic check box under Language settings for the system. Restart your computer when you are prompted to do so.
    3. In the Regional Options dialog box, click the Input locales tab, and then click Change.
    4. Under Installed Services, click Add. In the Add Input Language dialog box, select Turkish from the Input Language list.
    5. Click OK.
    6. In the notification area of taskbar, click the Language' icon, and then select Turkish.'
  2. Start Microsoft Visual Studio .NET.
  3. On the File menu, point to New, and then click Project.
  4. Click Visual C# Projects under Project Types, click Console Application under Templates, and then click OK.
  5. In the "Main" section of the default code, add the following code:

    int iVal1 = 10;
    int iVal2 = 20;
    int iSum = 0;
    string str = "\u0049\u0131\u0130\u0069";
    iSum = iVal1 + iVal2;
    Console.WriteLine("the sum is {0} string = {1}", iSum, str);
  6. Build the project.
  7. Insert breakpoints.
  8. Press F5 to start debugging.
  9. Press SHIFT+F5 to stop debugging.
  10. Change the name of the Class1.cs file to İ1.cs.
  11. Introduce a build error (remove line terminator ";" in the source code İ.cs).
  12. Build the application. You receive the build error.
  13. Double-click the build error in the Task List.

You receive the following error message:

"The operation could not be completed"

The problem occurs because the file name is put in the Task List. The correct string should be "İ1". The string that is put in the Task List is "i1", which does not have a matching file name.

You also experience the following problems:

  • All language services stop working or do not work correctly.
  • Outlining, colorization, code model, Intellisense, and loading designer do not work.
  • The editor does not show the breakpoints that are set in the code.

Debugger Problems

Debugger features do not work correctly.

  1. Follow the earlier steps 2 through 7.
  2. Open Class1.cs in the editor, and then rename the file to include a character from a different language. For example, the following Turkish character: İ1.cs.
  3. Build the project.
  4. Press F5 to start debugging. Notice that the debugger prompts you to open the file, even when the file is already open.

Compiler Warnings

You receive the warning message CS2002 when you compile the files that have two similar file names. One is with Turkish characters, and the other with the same file name but with Latin characters. For example, file1 has İ1.cs (Turkish Characters) and file2 has I1.cs (Latin characters).

Compile file in Visual Studio .NET:

csc İ1.cs I1.cs

You receive the following CS2002 warning message:

Source file '¦1.cs' specified multiple times





Keywords: kbbug kbide kbdebug KB814910