不生成资源文件的代码 [英] Resource file code not generated

查看:118
本文介绍了不生成资源文件的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的默认资源文件 Resources.resx 为它的Visual Studio很好地生成一个 designer.cs 类,但是当我尝试创建 Resources.de-DE.resx ,它不会产生。

I have my default resource file Resources.resx for which visual studio nicely generates a designer.cs class, but when I try to create Resources.de-DE.resx, it does not generate.

我检查了所有这两个文件的属性相同。

I checked all the properties for both files are same.

它生成 Resources1.resx ,而不是 Resources.de-DE.resx Resources.en-US.resx

推荐答案

您好@TRS你可能会感到困惑,有一个存在的 Designer.cs 对于 Resources.resx 并有应 someDesigner.cs 对于 Resources.de-DE.resx 但这并非如此,因为设计师文件是相同的所有资源文件。也就是在创建属性的 Designer.cs 也很常见,这意味着你会使用这个属性为每次转换,这样就可以使不同的是ResourceCulture的基础上。

hello @TRS you may be confused about that there is a Designer.cs present For Resources.resx and there should be someDesigner.cs for Resources.de-DE.resx but this is not the case because designer file would be same for all the resource files. and also the property that is created in Designer.cs is also common that means you will use this property for every conversion so the difference that you can make is on the basis of ResourceCulture.

这篇关于不生成资源文件的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆