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 (836733)



The information in this article applies to:

  • Microsoft Visual C++ .NET (2003)
  • Microsoft Visual C++ .NET (2002)

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, FilePath 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.

MORE INFORMATION

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.
  3. Under Project Types, click Visual C++ Projects.
  4. 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.
  5. In the Name box, type MyStringTab, and then click OK.
  6. On the Project menu, click Add Resource.
  7. In the Add Resource dialog box, click String Table under Resource type, and then click New.
  8. 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 "Symptoms" section of this article.
Note You can reproduce this problem with any project template that uses a resource file.

Modification Type:MinorLast Reviewed:1/18/2006
Keywords:kbWindowsForms kbtable kbString kbResource kbide kbForms kberrmsg kbbug KB836733 kbAudDeveloper