2011-06-27 23 views
4

尝试使用Newtonsoft.Json.WindowsPhone引用编译项目,并且在构建时出现gettign 2错误。我正在编译Windows Mobile 6.0和最新版本的Newtonsoft ver 4.0,我没有提供System.Windows可供选择,并且系统已经被引用。有想法该怎么解决这个吗?JSON C#使用Newtonsoft的问题

The type 'System.Collections.Specialized.INotifyCollectionChanged' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' 

The type 'System.ComponentModel.INotifyPropertyChanged' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. 

回答

4

好的通过下载Newtonsoft的3.5版本并使用Compact版本Newtonsoft.Json.Compact.dll找到答案。

+0

WindowsPhone dll仅适用于Windows Phone 7及更高版本。 –