How can I reuse .NET resources in multiple executables?
Posted
by Brandon
on Stack Overflow
See other posts from Stack Overflow
or by Brandon
Published on 2010-05-14T02:19:31Z
Indexed on
2010/05/14
2:24 UTC
Read the original article
Hit count: 329
I have an existing application that I'm supposed to take and create a "mini" version of. Both are localized apps and we would like to reuse the resources in the main application as is. So, here's the basic structure of my apps:
MainApplication.csproj
/Properties/Resources.resx
/MainUserControl.xaml (uses strings in Properties/Resources.resx)
/MainUserControl.xaml.cs
MiniApplication.csproj
link to MainApplication/Properties/Resources.resx
link to MainApplication/MainUserControl.xaml
link to MainApplication/MainUserControl.xaml.cs
MiniApplication.xaml (tries to use MainUserControl from MainApplication link)
So, in summary, I've added the needed resources and user control from the main application as links in the mini application. However, when I run the mini application, I get the following exception. I'm guessing it's having trouble with the different namespaces, but how do I fix?
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure \"MainApplication.Properties.Resources.resources\" was correctly embedded or linked into assembly \"MiniApplication\" at compile time, or that all the satellite assemblies required are loadable and fully signed.
FYI, I know I could put the user control in a user control library but the problem is that the mini application needs to have a small footprint. So, we only want to include what we need.
© Stack Overflow or respective owner