Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly Microsoft.Expression.Interactions and GalaSoft.MvvmLight.Extras.WPF4

I am facing unknown problem while using Prism 4. We implement business solution in MVVM pattern. For that I have used

 1. Microsoft.Expression.Interactions

 2. System.Windows.Interactivity

 3. GalaSoft.MvvmLight.Extras.WPF4

for Interaction.Triggers, CallMethodAction and EventToCommand.

<SWI:Interaction.Triggers>
    <SWI:EventTrigger SourceObject="{Binding ElementName=txtName}" EventName="GotFocus">
        <MEI:CallMethodAction TargetObject="{Binding Path=DataContext,ElementName=txtName}" MethodName="txtName_GotFocus"></MEI:CallMethodAction>
    </SWI:EventTrigger>
    <SWI:EventTrigger SourceObject="{Binding ElementName=txtName}" EventName="KeyUp">
        <GMEWCMD:EventToCommand   Command="{Binding Path=DataContext.cmdtxtNameKeyUpEvent,ElementName=txtName}" PassEventArgsToCommand="True">
        </GMEWCMD:EventToCommand>
    </SWI:EventTrigger>
</SWI:Interaction.Triggers>

Everything is working fine but now we required to make whole system loosely couple we choose prism 4. We already achieved this but above code create following problem as below.

Could not load file or assembly 'Microsoft.Expression.Interactions, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

If I comment above code everything is working fine. I don't know what an issue. Does PRISM 4 not support above assemblies?

Please help us to get rid from this problem.

Thank you

like image 781
user1173306 Avatar asked Dec 05 '22 18:12

user1173306


1 Answers

This commonly happens to me when I reference both Microsoft.Expression.Interactions and System.Windows.Interactivity in a view that belongs to a module, but I fail to also add those references to the project that acts as the shell.

like image 86
Bryan O Avatar answered May 10 '23 15:05

Bryan O