Microsoft KB Archive/836733

= BUG: You receive error messages when you add a new String Table resource to a Visual C++ .NET project and then you try to save or to build the project =

Article ID: 836733

Article Last Modified on 1/18/2006

-

APPLIES TO


 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual C++ .NET 2002 Standard Edition

-





SYMPTOMS
When you add a new String Table resource to a Microsoft Visual C++ .NET project and then you try to save or to build the project, you may receive the following error message:

Resource data is invalid.

Unable to save resource script.

When you click OK, you receive the following error message:

Cannot save file. FilePath

Note In this error message,  is a placeholder for the file path of your resource (.rc) file.

You may receive these error messages when you add a new String Table resource to a project that uses a resource file. Projects that use resource files include the following:
 * Windows Forms Application (.NET) projects in Microsoft Visual C++ .NET 2003
 * MFC Application projects in Microsoft Visual C++ .NET 2003 or in Microsoft Visual C++ .NET 2002
 * MFC DLL projects in Microsoft Visual C++ .NET 2003 or in Microsoft Visual C++ .NET 2002



RESOLUTION
To resolve this bug, add at least one entry in the String Table resource before you save or build the project. To do this, follow these steps:
 * 1) Click the Resource View tab, and then double-click the new String Table icon.
 * 2) In the resource editor, click the String Table row in the Caption column.
 * 3) Type a string in the Caption column, and then press ENTER.
 * 4) Press CTRL+SHIFT+S to save the project or press CTRL+SHIFT+B to build the project.

The project is successfully saved or built.



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 Microsoft Visual Studio .NET 2002 or Microsoft Visual Studio .NET 2003.
 * 2) On the File menu, point to New, and then click Project.

The New Project dialog box appears.
 * 1) Under Project Types, click Visual C++ Projects.
 * 2) If you are using Visual Studio .NET 2003, click Windows Forms Application (.NET) under Templates.

If you are using Visual Studio .NET 2002, click MFC Application or MFC DLL under Templates.
 * 1) In the Name box, type MyStringTab, and then click OK.
 * 2) On the Project menu, click Add Resource.
 * 3) In the Add Resource dialog box, click String Table under Resource type, and then click New.
 * 4) Press CTRL+SHIFT+S to save the project or press CTRL+SHIFT+B to build the project.

You receive the error messages that are mentioned in the &quot;Symptoms&quot; section of this article.

Note You can reproduce this problem with any project template that uses a resource file.

Keywords: kberrmsg kbbug kbwindowsforms kbide kbtable kbresource kbstring kbforms KB836733

-

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

© Microsoft Corporation. All rights reserved.