开发者

Borrowing resources from another assembly

开发者 https://www.devze.com 2023-01-05 19:37 出处:网络
I have project with my resources (resx files), and I want to use them as App_GlobalResources in anot开发者_StackOverflow社区her assembly which is asp.net project.

I have project with my resources (resx files), and I want to use them as App_GlobalResources in anot开发者_StackOverflow社区her assembly which is asp.net project.

Now I've tried to click on Add > Existing Item > Add as link, and despite the files are visible int this folder, they are missing on the runtime and i see info that the application cannot find resource with specified key..

Any suggestions? Maybe there is other way to use resources from that library?

I just want it to be joinable by <% $ Resources x, y %>


AFAIK the <%$ Resources:Key %> syntax works only with resource files in the App_LocalResources special folder.

You could make the auto-generated source file public (instead of internal) and use the key directly by setting the Custom Tool to PublicResXFileCodeGenerator.


Right click on the items, and set the compile mode to "Resource". I think that was what I had to do...

0

精彩评论

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