我编辑VS资源文件时,它都会重新生成相应的code和设置类访问修饰符内部。 这是一个痛苦的使用Ctrl-F - 每次我编辑RESX时间>的replaceAll。是否有一个属性/设置,以便我可以默认这种公众?
Every time I edit a resource file in VS, it regenerates the corresponding code and sets the class access modifier to internal. It's a pain to Ctrl-F -> ReplaceAll every time I edit the resx. Is there a property/setting so that I can default this to public?
internal class MyResource {
internal static global::System.Resources.ResourceManager ResourceManager {...}
}
我需要所有这些内部
是公开
所有的时间。
相反,ResXFile codeGenerator的,使用PublicResXFile codeGenerator。
Instead of the ResXFileCodeGenerator, use the PublicResXFileCodeGenerator.
您可以通过设置这是在属性窗口中的自定义工具属性你想公开访问的Resx文件做到这一点。
You can do this by setting this as the Custom Tool property in the Property Window for the Resx file you want public access to.
编辑:Alternatetively当您打开Visual Studio中的RESX文件,您可以设置访问修饰符公众。访问修饰符下拉框可以在表单的顶部找到。
Alternatetively you can set the Access Modifier to public when you open the resx file in Visual Studio. The Access Modifier dropdown box can be found at the top of the form.
上一篇:如何配置功能NHibernate输出查询,以跟踪和调试,而不是控制台?控制台、而不是、功能、NHibernate
下一篇:HttpClient的请求抛出IOException异常抛出、异常、HttpClient、IOException