문제

I am following the answer below to make globalization happen. Globalization in ASP.Net MVC 3

However, I have failed.

I am getting back a compilation fail error for the following line:

using ViewResources;

I have created Resources folder, created 2 resource file per locale(ViewResources.resx, ViewResources.en.resx), added

<add namespace="ViewResources" />

to web.config in Views folder and it fails like a boss. Compiler Error Message: CS0246: The type or namespace name 'ViewResources' could not be found (are you missing a using directive or an assembly reference?)

도움이 되었습니까?

해결책

You need to specify that the file type as 'embedded resource', to do this select the file in solution explorer, right click-> select properties, change build action to 'embedded resource'

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top