在引用一个解决方案,从多个项目的资源文件 [英] Referencing resource files from multiple projects in a solution

查看:238
本文介绍了在引用一个解决方案,从多个项目的资源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地化,它由几个项目的asp.net应用程序的工作。

I am working on localization for a asp.net application that consists of several projects.

对于这一点,但是也有一些在几个这些项目中使用的一些字符串。当然,我宁愿在每个项目的资源文件的一个副本。

For this, there are some strings that are used in several of these projects. Naturally, I would prefer to have only one copy of the resource file in each project.

由于资源文件不具有命名空间(至少据我可以告诉),他们不能像普通类访问。

Since the resource files don't have an namespace (at least as far as I can tell), they can't be accessed like regular classes.

有什么办法来引用另一个项目RESX文件,同样的解决方案中?

Is there any way to reference resx files in another project, within the same solution?

推荐答案

您可以只创建一个类库项目,添加有一个资源文件,然后参考该程序集的公共资源。

You can just create a class library project, add a resource file there, and then refer to that assembly for common resources.

这篇关于在引用一个解决方案,从多个项目的资源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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