The name "Interaction" does not exist in the namespace "http://schemas.microsoft.com/expression/2010/interactivity"

Solution 1:

  1. Remove any project reference to Microsoft.Expression.Interactions and System.Windows.Interactivity.

  2. Install through Nuget the newer Microsoft.Xaml.Behaviors.Wpf, which replaces the aforementioned references, i.e. open the Package Manager console and type:

    Install-Package Microsoft.Xaml.Behaviors.Wpf ProjectName

  3. In the Xaml-files, replace the xmlns namespaces http://schemas.microsoft.com/expression/2010/interactivity and http://schemas.microsoft.com/expression/2010/interactions with http://schemas.microsoft.com/xaml/behaviors

Solution 2:

If you have this problem before everything else double check if you have reference to both Microsoft.Expression.Interactions AND System.Windows.Interactivity.

I just want to warn, that I tried to do everything like PitAttack76 wrote on his answer and it didn't uninstall Blend for me. It just uninstall some parts so when I restart my computer and want to open the project in Blend it writes an error message as in this thread. Than I have to install .NET framework 4.5.1 and Microsoft Build Tools 2013 to Blend start working again. Nevertheless it didn't help me in any way - my problem was, that I have only Microsoft.Expression.Interactions in my references.

Solution 3:

Ok, I've got it fixed. When I installed Visual Studio 2012 Professional (with Blend), I had the option to install Blend for Visual Studio. I thought that maybe that caused the problem so I opened the installer again, choosed Modify and unchecked the option Blend for Visual Studio.

And guess what, it worked. No more errors on the Interaction. This now works fine again! What the actual issue is, I don't know so if anyone does know, do please tell me :)

<i:Interaction.Triggers>
    <i:EventTrigger EventName="MouseDoubleClick">
        <i:InvokeCommandAction Command="{Binding AddSelectLocomotifCommand}"
                                                     CommandParameter="{Binding SelectedItem, ElementName=listBoxLocs}" />
    </i:EventTrigger>
</i:Interaction.Triggers>

Solution 4:

I removed the missing references Microsoft.Expression.Interactions AND System.Windows.Interactivity. Then I installed Nuget package Microsoft.SDK.Expression.Blend by Hansan Pringle. This is installed the missing references.

Solution 5:

I had the same problem. What I did was:

  1. Remove Microsoft.Expression.Interactions and System.Windows.Interactivity from the project in Visual Studio while keeping the xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" namespace.
  2. Open the same project in Blend.
  3. Add the correct .net versions of Microsoft.Expression.Interactions and System.Windows.Interactivity back in Blend (in my case it was 4.5).