7

I'm building Windows Phone 8 app using MVVM Light. So far, so good. However, when I used EventToCommand, I get multiple errors. One similar question is here EventToCommand not working when migrate to v4 for SL5, but sadly it doesn't solve my problem.! It automatically adds following reference:

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

Errors that I receive:

The name "EventToCommand" does not exist in the namespace "clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP8"

The type 'command:EventToCommand' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

The tag 'EventToCommand' does not exist in XML namespace 'clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP8'

Let me know if I'm missing anything or doing something wrong.

Thanks

Community
  • 1
  • 1
Mayur Tendulkar
  • 718
  • 5
  • 11

3 Answers3

8

Here is the correct xmlns (you were missing Extras in the assembly name):

xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"
Olivier Payen
  • 15,198
  • 7
  • 41
  • 70
4

Replace it with

xmlns:command1="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"
ScottIsAFool
  • 163
  • 7
4

With the recent version the command moved to Platform assembly:

xmlns:command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
Mando
  • 11,414
  • 17
  • 86
  • 167