【问题标题】:Can not get newly added files from Resources.resx无法从 Resources.resx 获取新添加的文件
【发布时间】:2016-07-14 08:40:20
【问题描述】:

我正在尝试向Resources.resx 添加新文件,但是Resources.Designer.cs 没有更新为新文件,我无法通过Assembly 获取该文件。它只显示一个文件,该文件是前段时间添加的。

我尝试将Resources.resx 中的Access Modifier 设置为InternalPublic 希望解决该问题,但随后我在Resources.Designer.cs 中出现错误 Ambiguity between 'Resources.resourceCulture' and 'Resources.resourceCulture.

有些帖子建议点击Run Custom tool,但是当我在Resources.resx文件上点击右键时没有这样的选项。

有人知道我缺少什么来更新Resources.Designer.cs 吗?

【问题讨论】:

    标签: c# visual-studio visual-studio-2015 resx


    【解决方案1】:

    已经解决了,所以如果其他人遇到了这个问题,我什么时候会这样做。

    对于Resources.resx,我将文件属性下的Custom ToolBuild Action 分别设置为GlobalResourceProxyGeneratorEmbedded Resource。然后为每个添加的文件将Build Action 设置为Embedded Resource

    我不知道这是否正确,但我似乎工作正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-06
      • 1970-01-01
      • 2012-09-09
      • 2016-07-19
      • 1970-01-01
      • 2015-12-25
      • 1970-01-01
      • 2013-07-12
      相关资源
      最近更新 更多