Could not find resources for the specified culture or neutral culture.

I should try to use internationalization with this example.

http://afana.me/post/aspnet-mvc-internationalization-part-2.aspx

But I get this problem

Could not find resources suitable for the specified culture or neutral culture. Ensure that “Resources.Resources.resources” has been correctly integrated or connected to the “Resources” assembly at compile time, or that all necessary assembly nodes are downloadable and fully signed.

I am looking for a seducer on Google, but I do not understand him.

I create my resources as follows.

Right-click on Solution, and then select the "Add-> New Project" context menu command. Select the class library project type and name it Resources. Now right-click the “Resources” project, and then select the “Add-> New Element” shortcut menu command. Select "Resource File" and name it "Resources.resx"

In another example, I read that people create resources in this App_GlobalResources file, is this relevant to my error ???

+7
source share
1 answer

I understand that this is an old question, however, in case it helps someone else to find here →>

You need to set the .resx assembly action to "Embedded Resource" to work with Data Annotations, as in this example. When you add .resx to the App_LocalResources folder, the assembly defaults to Content.

In addition, in the above example, you added it to another project, so make sure the access modifier is also set to "Public" (double-click the .resx file to open the file, and the access modifier is located at the top of the editor window).

Also make sure you add a link to the resource project from the main application.

+13
source

All Articles