简体   繁体   English

无法从Resources.resx获取新添加的文件

[英]Can not get newly added files from Resources.resx

I am trying to add new file to Resources.resx , however Resources.Designer.cs is not being updated with new file and I can not get that file via Assembly . 我正在尝试将新文件添加到Resources.resx ,但是Resources.Designer.cs并未使用新文件进行更新,并且无法通过Assembly获得该文件。 It shows only one file, which was added some time ago. 它仅显示一个文件,该文件是在一段时间前添加的。

I've tried seting Access Modifier in Resources.resx to Internal and Public hoping to solve that problem, but then I get error in Resources.Designer.cs Ambiguity between 'Resources.resourceCulture' and 'Resources.resourceCulture . 我试图将Resources.resx Access ModifierInternalPublic希望解决该问题,但是随后我在Resources.Designer.cs遇到错误,即Ambiguity between 'Resources.resourceCulture' and 'Resources.resourceCulture

Some post suggest to clicking Run Custom tool , but the is no such option when I click right-button on Resources.resx file. 一些帖子建议单击Run Custom tool ,但是当我在Resources.resx文件上单击鼠标右键时,没有这样的选项。

Does any one know what I'm missing to make Resources.Designer.cs update? 有谁知道我缺少使Resources.Designer.cs更新的内容吗?

Got that solved, so if someone else gets this problem, when this is what I did. 解决了,所以如果别人遇到这个问题,那是我做的。

For Resources.resx I set Custom Tool and Build Action , which are under file properties, to GlobalResourceProxyGenerator and Embedded Resource respectively. 对于Resources.resx我分别在文件属性下将Custom ToolBuild Action设置为GlobalResourceProxyGeneratorEmbedded Resource And then set Build Action to Embedded Resource for each added files. 然后为每个添加的文件将“ Build Action设置为“ Embedded Resource ”。

I don't know if this is the proper way, but I seems to be working properly. 我不知道这是否正确,但是我似乎工作正常。

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

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