Resource (RESX) files messed up

mare picture mare · Jul 27, 2010 · Viewed 8.8k times · Source

I had a resource file named Localize.resx, which contains English strings. I copied and pasted it inside the same folder(App_GlobalResources), VS created a copy, I renamed the copy to Localize.sl.resx and the original to Localize.en.resx. Now everything in codebehind files (Localize.en.designer.cs) is gone. Deleting the designer file and selecting Run Custom Tool generates a new but completely blank designer file.

I still have all my strings in both resx's but the designer files are gone (empty) so the application does not build.

Any suggestions?

This is inside Vs 2010 with ASP.NET MVC solution.

Answer

Alvis picture Alvis · Jun 5, 2012

I had the same problem - Designer.cs file not being present for some resx files.

The fix was to set the properties for the resx files:

Build Action - Embedded Resource
Custom Tool  - PublicResXFileCodeGenerator