Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Fails to Import Microsoft.SharePoint dll

Discussion in 'General Discussion' started by dev_sunnysideup, Oct 17, 2022.

  1. dev_sunnysideup

    dev_sunnysideup

    Joined:
    Nov 22, 2015
    Posts:
    8
    I wanted to upload build files to Sharepoint. So, I tried importing Microsoft.SharePoint.dll (ver.15.0.0) under Assets/Plugins directory to use SharePoint library functions. But, errors below occured and I don't know why this kind of things happen.

    upload_2022-10-17_18-29-33.png

    I tried importing other version of dll such as ver.14.0.4762.1000 or 14.0.0 and it didn't make any error but I couldn't refer to any library functions.

    upload_2022-10-17_18-31-56.png
    The image above is the dll's import settings.
    My unity version is 2020.3.40.f1 and my project's api compatibility level is .Net 4.X. Please let me know if you know to how solve this problem. Thanks.
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,196
    Why would you include the Sharepoint.DLL? Were you instructed to do so by some tutorial or manual?

    Usually those webservices have a web backend with which you have to communicate via GET/POST requests.
    Check this thread.
     
  3. dev_sunnysideup

    dev_sunnysideup

    Joined:
    Nov 22, 2015
    Posts:
    8
    No, I searched for the way to upload file to Sharepoint libarary and I found an example code (https://www.sharepointdiary.com/201...ically-upload-file-to-sharepoint-library.html). In this example, Microsoft.Sharepoint namespace is used and I thought that I should import Microsoft.Sharepoint dll. Thank you for your advice, I'll check the thread you attached.
     
    Last edited: Oct 20, 2022
  4. Teenman

    Teenman

    Joined:
    Oct 28, 2015
    Posts:
    1
    dev_sunnysideup likes this.