ASP.NET (resx) resources do not work after migrating to .NET 4.5

installed Visual Studio 2012 and port my web applications to .NET 4.5. I had many resx files in App_GlobalResources and always works.

After migration, resx files are generated in the designer " namespace MyApp.App_GlobalResources " instead of "namespace resources".

I solved this by renaming App_GlobalResources to " Resources " and changed the custom tool from "GlobalResourceProxyGenerator" to " PublicResXFileCodeGenerator ".

But this does not work with the expression, for example: <% $ Resources: users, LoginTitle%>

thanks for the advice

+7
source share
2 answers

Although I changed the Custom Tool to: PublicResXFileCodeGenerator, I don't know if it works for me.

The main problem: in my case, when I built the MVC 3 project in Visual Studio 2012, it created the "Resources" namespace for the .resx files.

As in Visual Studio 2010, this was in the namespace "App_GlobalResources".

I renamed the namespace in the designer.cs file for resource files back to "App_GlobalResources" and it worked for me.

+5
source

I found this article. Now it works

I installed my own tool: PublicResXFileCodeGenerator

special tool namespace: Resources

and build action: Embeded Resource

+1
source

All Articles