Our WPF app is spread over several assemblies, which we embed in the mainApp.exe, using the recommedations from a few blog entries:
http://richarddingwall.name/2009/05/14/wpf-how-to-combine-mutliple-assemblies-into-a-single-exe/
http://www.digitallycreated.net/Blog/61/combining-multiple-assemblies-into-a-single-exe-for-a-wpf-application
However, we also use he logging facility from the enterprise library, which requires a configuration file. Without az config file, no logging.
The problem is that, when we put the configuration file in the same directory as the .exe with embedded DLLs, the XAML files that are contained in the embedded DLL are not found, and we get the exception:
HResult=-2146233088
Message=The component 'XXX' does not have a resource identified by the URI '/<assemblyName>;<path-to-resource>/YYY.iw.xaml'.
Source=PresentationFramework
Obviously, the resource is not found inside its containing DLL, but the strange thing is that, when the mainApp.exe.config file containing logging configuration is absent, then the application works like a charm (except for the logging part).
We cound use a hand on how to either:
- be able to deploy a config file that does not cause XAML/BAML in embedded DLLs to be ignored
- configure logging from inside the app.