我有一个用于pda的空项目(紧凑框架3.5)。我添加了一个图像列表,并在列表中添加了一个图像。当我在CE7设备(Motorola MC32N0)上部署项目时,我在该行获得了PlatformNotSupportedException
this.imageList1.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
堆栈跟踪是:
at System.Globalization.CompareInfo..ctor(Int32 culture)
at System.Globalization.CompareInfo.GetCompareInfo(Int32 culture)
at System.Globalization.CultureInfo.get_CompareInfo()
at System.Collections.Comparer..ctor(CultureInfo culture)
at System.Collections.Comparer..cctor()
at System.OrdinalComparer.EqualsStringImpl(String x, String y)
at System.StringComparerImpl.Equals(Object x, Object y)
at System.Collections.Hashtable.KeyEquals(Object item, Object key)
at System.Collections.Hashtable.get_Item(Object key)
at System.Globalization.CultureInfo.GetCultureInfoHelper(Int32 lcid, String name, String altName)
at System.Globalization.CultureInfo.GetCultureInfo(String name)
at System.Globalization.CompareInfo.GetSortingLCID(Int32 culture)
at System.Globalization.CompareInfo..ctor(Int32 culture)
at System.Globalization.CompareInfo.GetCompareInfo(Int32 culture)
at System.Globalization.CultureInfo.get_CompareInfo()
at System.Globalization.CultureInfo.GetHashCode()
at System.Collections.Hashtable.GetHash(Object key)
at System.Collections.Hashtable.InitHash(Object key, Int32 hashsize, UInt32& seed, UInt32& incr)
at System.Collections.Hashtable.get_Item(Object key)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture)
at System.Resources.ResourceManager.GetObject(String name)
at SmartDeviceProject5.Form1.InitializeComponent()
at SmartDeviceProject5.Form1..ctor()
at SmartDeviceProject5.Program.Main()
我只在CE7中得到这个例外。有什么想法吗?
答案 0 :(得分:0)
我认为MC32xx只有一个"核心" CE7。我遇到了类似的问题。您是否正确安装了Compact Framework 3.5。 windows \ wceload.exe向您展示了什么?也许你必须单独安装它。