a installed Visual Studio 2012 and migrate my Web Apps to .NET 4.5. I had many resx files in App_GlobalResources and always it works.
After migration resx files generates in designer "namespace MyApp.App_GlobalResources" instead of "namespace Resources".
I solved this with rename App_GlobalResources to "Resources" and change custom tool from "GlobalResourceProxyGenerator" to "PublicResXFileCodeGenerator".
But it doesn't work with expression e.g.: <%$ Resources: Users, LoginTitle %>
Thanks for advice
resx file? If so, go to project properties, then the "Resources" tab, and there should be a big link to click to regenerate it.
The . resx resource file format consists of XML entries that specify objects and strings inside XML tags. One advantage of a . resx file is that when opened with a text editor (such as Notepad) it can be written to, parsed, and manipulated.
resx files are compiled into binary . resources files.
Although I changed Custom Tool to : PublicResXFileCodeGenerator, I dont know if it worked for me.
The main issue is - In my case, when I built my MVC 3 project on Visual Studio 2012, it made namespace "Resources" for the .resx files.
As in Visual Studio 2010, it was under namespace "App_GlobalResources".
I renamed the namespace under designer.cs for the Resource files back to "App_GlobalResources", and it worked for me.
I found this article. Now it works
I've set custom tool to : PublicResXFileCodeGenerator
custom tool namespace to: Resources
and build action: Embeded Resource
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With