VS2013 - Interactivity Verson 4.5

Jan 17, 2014 at 3:46 PM
Hi,

I am new to MVVM Light and I am havign trouble getting off the ground. I have a WPF .net 4.5 project using VS2013 Professional. I used nuget to add MVVM Light to my project.

The first issue I had was that I tried to register a ns using;

xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WPF45"

Then tried;
<cmd:EventToCommand Command="{Binding GridItemEdit}" PassEventArgsToCommand="True"/>
I didn't get any intellisense on cmd: until I changed the ns registration to;

xmlns:cmd ="http://www.galasoft.ch/mvvmlight"

At this point my app would now compile and intellisense works.

When I run my app, I now receive;

Could not load file or assembly 'System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

I have used Interaction.Triggers in other parts of my app with no issues. I am not sure why this is happening. If I remove the code
<cmd:EventToCommand Command="{Binding GridItemEdit}" PassEventArgsToCommand="True"/>
The app works fine.

Help!

Thank you.

George
Jan 17, 2014 at 4:24 PM
Hi,

I have setup a test project to remove any noise from my project and it seems as though the issue may lie with PRISM or Unity extensions. Before adding the nuget references to Unity the app run fine. Not sure why this is happening. Anyone have any ideas?

Thanks,

George
Jan 17, 2014 at 4:44 PM
I have done a little more work on this and my project blows up when I add a reference to PRISM. The error is still the same i.e. System.Windows.Interactivity etc but I know see;

The type 'EventToCommand' from assembly 'GalaSoft.MvvmLight,Extras.WPF45' is built with an older version of the Blend SDK, and is not supported in a Windows Presentation Framework 4 project.

When I hover over the <cmd:EventToCommand ......
Jan 20, 2014 at 9:55 AM
The issue was that I needed to add references to the MVVM Light libs in my Shell app. I added references to then Module I was working on which was fine until I tried to run the app.
Marked as answer by gstylli on 1/20/2014 at 1:55 AM