2013-10-23 63 views
7

我正在构建使用MVVM Light的Windows Phone 8应用程序。到现在为止还挺好。 但是,当我使用EventToCommand时,出现多个错误。一个类似的问题在这里EventToCommand not working when migrate to v4 for SL5,但遗憾的是它不能解决我的问题。它自动添加以下参考:EventToCommand缺少Windows Phone应用程序

名称 “EventToCommand” 不存在于命名空间“CLR-名称空间::我接收

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

错误GalaSoft.MvvmLight.Command;装配= GalaSoft.MvvmLight。 WP8“

未找到类型'command:EventToCommand'。验证您是否缺少程序集引用,并且所有引用的程序集都已构建。

标签“EventToCommand”不存在XML命名空间存在“CLR的命名空间:GalaSoft.MvvmLight.Command;装配= GalaSoft.MvvmLight.WP8”

让我知道如果我错过了什么或做什么错误。

感谢

回答

8

这里是正确的xmlns(你在程序集名失踪额外):

xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8" 
+0

非常感谢Olivier提供即时和正确的答案。 :) –

4

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

更换它随着最近版本的命令转移到平台组装:

xmlns:command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform" 
相关问题