我添加了使用Microsoft.SharePoint.Client;UserCollection?無法找到DLL
但仍然出現錯誤,是否需要下載一些DLL?
這是錯誤:
The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
我添加了使用Microsoft.SharePoint.Client;UserCollection?無法找到DLL
但仍然出現錯誤,是否需要下載一些DLL?
這是錯誤:
The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
(are you missing an assembly reference?)
這是重要組成部分。你說你已經爲命名空間添加了一個using
語句,但是你添加了一個程序集引用嗎?
首先,您需要DLL。接下來,右鍵單擊項目的「參考」部分(解決方案資源管理器窗口),單擊「添加參考」,然後瀏覽到DLL。添加它,你應該設置去。
這是否意味着向參考添加一個.dll?通過右鍵單擊和「添加參考」?如果是這樣我沒有,我找不到它Microsoft.SharePoint.Client.dll在那裏 – user1213488
@ user1213488:是的。在添加對程序集本身的引用之前,您無權訪問其代碼。你需要找到正確的DLL,只需添加一個「使用SomeNameSpace」是不夠的(你的項目怎麼知道在哪裏找到代碼?) –
類似的問題,但不完全一樣http://stackoverflow.com/questions/1333855/sharepoint-how-to-add-a-reference-from-c-sharp和http://stackoverflow.com/問題/ 590346/using-c-sharp-to-access-sharepoint-where-can-i-find-the-reference-library – Tremmors