Export (0) Print
Expand All
Expand Minimize

Resource transformation for file 'file' failed. <reason> 

The resources processor used to transform .resx files into binary .resources files failed. The specific reason (if any) is appended to the end of the string. The build process will fail if this error occurs.

This error is most likely caused by a bad .resx file. For example, the file may have been opened and modified in a text editor.

If you receive a <reason> of "Item has already been added. Key in dictionary: 'NewControlName.<Property Name>' Key being added: 'ControlName.<Property Name>'," read the following steps to reproduce and correct the error.

To reproduce this error

  1. Create a new Windows application. By default, Form1 is created.

  2. On the View menu, click Properties.

  3. In the Properties window, set the Localizable property to True.

  4. In the Properties windows, click Language, and then set the value to "Japanese".

  5. From the toolbox, drag a button onto the form.

  6. Change the name of the button from "Button1" to "BUTTON1".

  7. On the Build menu, click Build Solution.

To correct this error

  1. On the File menu, point to Open, and then click File.

  2. Locate the Form1.resx file, and then click OK. Form1.resx is displayed.

  3. Locate the original key values, and then manually delete them from the data list. For example, you have a button named "Button1". You modify the name of this button to "BUTTON1". The key values for both "Button1" and "BUTTON1" are in Form1.resx. Remove all the entries of "Button1", and then rebuild the project.

If you receive a <reason> of " Invalid ResX input," the error is most likely due to the .resx file format being modified after the release of Visual Studio 2005.

To correct this error

  • To resolve this problem, use the RegenResx conversion tool to convert the .resx file format. The RegenResx conversion tool is available from the following Microsoft Web site: http://go.microsoft.com/fwlink/?LinkId=35854.

See Also

Community Additions

© 2014 Microsoft