开发者

Centralize resources for solution

Friends, I am developing a project which include one exe type project and some dll type projects in a single solution. I am using some image type resources between these projects like application icon etc. Now I must include these resources in each project. My question is Is there any way so that I can create one dll projec开发者_JAVA百科t for resources and add all resources to that projects and access these resources in other project. Also is it possible to access these resources as properties [Like My.Resources.appICON or newDL.Resources.appICON] so that I don’t have to remember names of resources.

found some help - http://geekswithblogs.net/MarkPearl/archive/2011/03/02/centralizing-a-resource-file-among-multiple-projects-in-one-solution.aspx

but by this type i can use it only Programmatically not at design time like select picture for picture box


Visual Studio 2010 not support shared resource files! but you can access to resource-file from code behind and set icons manually to your controls!

i read in MSDN forums next version of visual studio resolved this problem!


Just create a plain class library project which contains your resources, and reference it from other projects.

To instruct Visual Studio to make the generated resource classes public, change the access modifier in the resource editor to public, as described here. Alternatively, there is a tool for VS2005 called ResX File Public Code Generator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜