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

3

4

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

Monocycle answered 27/1, 2012 at 10:54 Comment(1)
Having very similar issue, but not using Prism.Mysterious
N
14

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.

Niggard answered 16/1, 2013 at 18:39 Comment(3)
@franssu it means - add those references to application not only librarySergent
I don't know if this was the answer for the OP, but it was for me.Neutralism
Worked for me, tooKomara
B
1

I had a similar problem with Prism in Visual Studio 2012. The XAML editor would fail with the same exception.

The solution was to install Microsoft Expression Blend SDK. The assembly should be part of SDK. Allegedly, it is necessary for binding between control events and commands in XAML and some code may require it.

Balzac answered 7/1, 2014 at 21:24 Comment(0)
E
1

I had the same problem during a Prism 6.1 composite app using .NET 4.5.2, where i was referencing in one of the modules (class library) the Microsoft.Expression.Interactions & System.Windows.Interactivity. Eventually i had to reference the same dlls in the Desktop project (where bootstrapper and Shell belong)

Esmeraldaesmerelda answered 8/11, 2015 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.