Search code examples
c#asp.netresourcesresx

Borrowing resources from another assembly


I have project with my resources (resx files), and I want to use them as App_GlobalResources in another 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 %>


Solution

  • 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.