Hi,
I posted this question on the MSDN forum but haven't been able to receive much of an answer, so decided to try it out here.
I'm having a problem with dependency libraries of a project not being copied to the output directory of a second project that references it, when the first library is mostly xaml. Here is a typical scenario when this happens
SolutionX
- SomeControls.Dll { contains wpf user controls }
external reference: WPFTheme.dll*
- MainApp.Exe
project reference: SomeControls.dll
Commonly what happens here is that when building the solution, WPFTheme.dll is not copied to the output directory of the MainApp.Exe project. (* this also works if referencing a third project instead of an external)
I usually use a post build event to handle this situations... but i found the problem was intermittent.
If I don't reference ANY of the classes in WPFTheme.dll in my c# code but I do so in xaml, then as said before the WPFTheme.dll library doesn't get copied.
BUT if i reference Any class (even just assigning them null) from some c# in the project (even backend xaml.cs class) - then everything works as one would expect.
So has anyone else encountered this problem? Is there a way to force the library to get copied if referenced by xaml?
Just to add more info... all this happens with libraries that show up as external in the project file with a relative path in the HintPath.
Thanks everyone,
K