Microsoft KB Archive/814910

= You may receive multiple errors when you have a file name with characters from a different language in Visual C# .NET =

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 ' ' 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

Navigation Features That Do Not Function Correctly When You Double-Click the Error in the Task List
 Set System locale to Turkish.

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

To do this in Microsoft Windows 2000 Advanced Server, follow these steps:  In Control Panel, double-click Regional Options.</li> 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.</li> In the Regional Options dialog box, click the Input locales tab, and then click Change.</li> Under Installed Services, click Add. In the Add Input Language dialog box, select Turkish from the Input Language list.</li> Click OK.</li> In the notification area of taskbar, click the Language icon, and then select Turkish.</li></ol> </li> Start Microsoft Visual Studio .NET.</li> On the File menu, point to New, and then click Project.</li> Click Visual C# Projects under Project Types, click Console Application under Templates, and then click OK.</li>  In the &quot;Main&quot; section of the default code, add the following code: int iVal1 = 10; int iVal2 = 20; int iSum = 0; string str = &quot;\u0049\u0131\u0130\u0069&quot;; iSum = iVal1 + iVal2; Console.WriteLine(&quot;the sum is {0} string = {1}&quot;, iSum, str); </li> Build the project.</li> Insert breakpoints.</li> Press F5 to start debugging.</li> Press SHIFT+F5 to stop debugging.</li> Change the name of the Class1.cs file to İ1.cs .</li> Introduce a build error (remove line terminator &quot;;&quot; in the source code İ.cs).</li> Build the application. You receive the build error.</li> <li>Double-click the build error in the Task List.</li></ol>

You receive the following error message:

&quot;The operation could not be completed&quot;

The problem occurs because the file name is put in the Task List. The correct string should be &quot;İ1&quot;. The string that is put in the Task List is &quot;i1&quot;, 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

<div class="references_section">

Keywords: kbbug kbide kbdebug KB814910

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.