Borrowing resources from another assembly
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...
精彩评论