We have an application as well as a Visual Studio add-in that both load their (modular) functionality from Mef assemblies located elsewhere on a users machine than the application is installed itself.
Now one of our developers used Wpf (using Prism/System.Windows.Interactivity) to create the UI component for a new module but unfortunately now the module / Xaml Parser throws a XamlParseException saying that it cannot load System.Windows.Interactivity.dll and looking at the fusion log basically shows that the paths its looking for / in is the one the hosting .exe runs from, not where the Mef module (containing the wpf / xaml ui) resides in.
The System.Windows.Interactivity.dll does in fact reside in the Mef's module/assembly directory (referenced in that mef module / assembly and copy local set to true) so I was wondering how we would specify the namespace for System.Windows.Interactivity properly below so the assembly loading does in fact look in the assembly's directory aswell?
<UserControl x:Class="TestExplorer.Modules.DocumentChecks.DocumentChecksMainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Converter="clr-namespace:TestExplorer.Modules.DocumentChecks.Converter"
xmlns:TreeView="clr-namespace:TestExplorer.Modules.DocumentChecks.TreeView" mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="500">
There is one entry here at SO that has the exact same problem (see Prism assembly reference failure: System.Windows.Interactivity), however the solution to add prism/system.windows.interactivity as reference to the hosting application is only a workaround, at best - it basically defeats the applications' modular purpose (leave alone that we cannot deploy the system.windows.interactivity into the devenv.exe's location in case users use our Visual Studio Addin.. and devenv.exe being the hosting process there).