I have a couple standard WPF projects (not UWP) that are both referencing a shared project using the new Visual Studio 2015 Shared Project type. This looks like it works great for sharing code, but I'd also like to share strings and other resources that would normally be found in a resource.resx file. Focusing on strings, I have created a resource.resw file in the shared project and populated with my values. But I'm stuck on how to reference those values from either of my WPF projects.
I see that, by default, the .resw file has a build action of PRIResource. I'm not sure what that type of resource is exactly, nor have I been able to find anything useful to explain it. Either way, I haven't been able to reference my strings with that build action. I have also tried changing build action to Embedded Resource, along with setting a unique Custom Tool Namespace value, but that doesn't seem to give me access either.
I'm used to accessing string resources that live in .resx files by using MyNamespace.Properties.Resources.MyStringKey
, but no such path seems to resolve when trying to reference the .resw file. I've also seen references to using the ResourceLoader
class to access those strings, but that seems to be specific to UWP.
How do I access .resw strings that live in a Visual Studio 2015 Shared Project from the projects that reference it?