2011-06-27 26 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及更高版本。 –