1
我有一個程序,我需要從我們的交換服務器獲取電子郵件。我得到這個從舊項目:當我編譯時引用神祕消失
Dim oExchService As New ExchangeService(Microsoft.Exchange.WebServices.Data.ExchangeVersion.Exchange2007_SP1)
oExchService.Credentials = New Net.NetworkCredential(strUserName, strPassword, strDomain)
oExchService.Url = New Uri(strServeur)
Dim oItemView As New ItemView(1000)
oItemView.Traversal = ItemTraversal.Shallow
Dim oLstItems As FindItemsResults(Of Item) = oExchService.FindItems(WellKnownFolderName.Inbox, oItemView)
'Importation de chaque fichier
For Each oItem As Item In oLstItems
If oItem.HasAttachments Then
End If
Next
我加入了參考Microsoft.Exchange.webservice.dll這也是我從其他項目得到了和文件中導入參考。一切似乎都很好,我可以與類內的成員一起工作。當我打編譯,其中作爲進口statetement獲得綠色強調指出好好嘗試一下存在或不具有任何公共成員參考...
任何人都知道這是怎麼回事?
不知道發生了什麼事。我從NuGet安裝,無法重現該問題。您也可以嘗試使用NuGet進行安裝。搜索exchangewebservices(全部一個詞)來獲取該DLL。 – 2012-04-26 19:55:48
嘗試過,但我得到了完全相同的結果。只要我不編寫我可以使用它沒有問題。只要我打了,就像完全消失並且不起作用。你要知道我可以在編譯之前訪問一切(我得到了智能感知) – 2012-04-27 19:48:47
所以,我終於做到了工作,但是這是我第一次看到這個,最後希望。 – 2012-04-27 20:01:29