2012-05-13 107 views
0

我有兩個我的Windows Phone應用程序這一行:VB的Silverlight for Windows Phone支持「System.Xml.Linq的」

Dim doc = XDocument.Parse(e.Result)在這些應用程序它工作正常的一個 ,在另外一個它似乎是錯誤的... 實際上它不能找到對象 「的XDocument」

當我打字:

Imports System.Xml.Linq

它給我的錯誤警告:

Warning 2
Namespace or type specified in the Imports 'System.Xml.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

,工程應用和送我回這個錯誤,這worning的是,一個是簡單的windows phone頁面(工作一個),另一種是應用程序之間的唯一性差異全景頁面:S

任何想法,爲什麼我有這個警告?

謝謝

回答

2

我想你可能首先需要對包括參考System.Xml.Linq的使用Visual Studios的「添加引用」命令(右鍵單擊項目節點在項目資源管理器中,添加引用)。

+0

但它應該不會,因爲我打字需要這一個: Imports System.Xml.Linq :S 什麼! 謝謝!有效 !! :) –

+0

它確實需要那個,因爲您需要先在PROJECT LEVEL上引用,然後在FILE LEVEL上。項目級別確定要引用的文件的版本和ID,文件級別不。實際上有多個版本的System.Xml.Linq可用。一個用於3.0,3.5,4.0等 – sinni800

+0

:好的...我明白了! 謝謝:) –

相關問題