Search code examples
c#visual-studiorestweb-servicesodata

Service Reference error upon creation


I'm currently having an issue with adding an OData service in a C# project. The service looks like this.

My step by step process looks like this:

STEP 1: Entering the OData URL

STEP 2: After hitting OK, the following error pops up.

STEP 3: Trying to update the service

----> Which results in following error.

I can't seem to figure out what causes these issues. If anyone has any suggestions, please let me know. It would be greatly appreciated!


Solution

  • Instead of using the service reference with UWP. I used Ajax calls to get the data. Some of them weren't allowed in a Unity build. This is why I used tags to exclude scripts like this:

    #if (UNITY_EDITOR) 
    ... your class/code ...
    #endif
    

    More information about this can be found by following this url.

    https://support.unity3d.com/hc/en-us/articles/208456906-Excluding-Scripts-and-Assets-from-builds