我在 MVC 3 中创建了一个应用程序并添加了一个文件夹 [Resources]。文件夹包含 .resx 文件。但是当我在视图中使用 .resx 文件时,没有智能感知并且编译器抛出错误 =>
CS0234: The type or namespace name 'Resources' does not exist in the namespace 'MyApp.web' (are you missing an assembly reference?)
我在视图中使用它=> <h1>@MyApp.web.Resources.Index.Heading</h1>
index= Resx 文件名,Heading=KeyName