我有一個Silverlight應用程序,我需要在Web項目中的System.Windows中使用Vector類。但VS抱怨System.Windows不存在。我嘗試添加引用,但它不在要添加的名稱空間列表中。在.NET選項卡中,它從System.Web.Services轉到System.Windows.Forms並完全跳過System.Windows。缺少System.Windows參考
真正奇怪的是System.Windows DOES存在於Silverlight項目的參考列表中。此外,我在這臺機器上安裝了另一個Silverlight應用程序,它具有完全相同的設置(兩個項目,一個Silverlight,一個Web),並且參考在那裏。
我看到有人在這裏有類似的問題,但沒有解決方案爲我工作。有沒有其他人經歷過這個?
這沒有爲我工作。我想使用System.Windows.Media.Imaging.BitmapImage,所以我想這不是在WindowsBase中。 (注意:我可以在sliverlight客戶端添加對System.Windows.DLL的引用,但不在服務器端。 – tkerwood 2011-09-07 04:17:45
它位於 (#region Assembly System.Windows.dll,v2.0.50727 // c:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework \ Silverlight \ v4.0 \ System.Windows.dll #endregion) 所以只能在Silverlight客戶端上使用,我會看看使用System.Drawing。改爲圖片 – tkerwood 2011-09-07 04:40:16
在Silverlight 5中,這似乎不起作用... – Knasterbax 2012-12-05 09:23:46