简体   繁体   English

无法在VS2012中创建资源文件

[英]Not able to create resource file in VS2012

I'm trying to generate local resource file for pages. 我正在尝试为页面生成本地资源文件。 I successfully generated a few, but one of the pages didnt generate resource file, showing a message in output: "Start creating resource content and adding 'meta' attributes to server controls and directives. A resource writer could not be found. Finished creating resource content and adding 'meta' attributes." 我成功生成了一些,但其中一个页面没有生成资源文件,在输出中显示一条消息:“开始创建资源内容并将'meta'属性添加到服务器控件和指令。无法找到资源编写器。完成创建资源内容和添加'meta'属性。“

App_LocalResources folder already existed in the parent folder but was excluded from project, hence it was not generating the resx file. App_LocalResources文件夹已存在于父文件夹中,但已从项目中排除,因此它未生成resx文件。 All I had to do was to include the folder back into the project. 我所要做的就是将文件夹包含在项目中。

Try adding/changing the globalization attribute in web.config and then verify. 尝试在web.config中添加/更改全球化属性,然后验证。

<system.web>
  <globalization enableClientBasedCulture="true" culture="auto" uiCulture="auto"/>
</system.web>

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM