Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Unity Hololens access webservice

edited July 2016 in Questions And Answers

I am using Unity to build an app for the HoloLens that access a webservice to retrieve data.
It works fine in the Unity Editor and the data is loaded from the webservice without any problems.

The webservice is build in asmx and I generate a .cs for it using the following Unity Mono command line

wsdl MyWS.wsdl -o:MyWS.cs

When I try to build it for the HoloLens (using this tutorial: http://hololenshelpwebsite.com/Blog/EntryId/1006/HoloLens-Hello-World) the build fails with the following error:

Assets\WebClient\MyWS.cs(25,2): error CS7069: Reference to type 'Component' claims it is defined in 'System', but it could not be found

Note: Before I integrated the webservice, I was able to build and export to the HoloLens.

I keep searching on the net, but so far every potential solution I found failed.

Is it actually possible to access a webservice from the HoloLens?

Best Answer


  • wsdl.exe creates an old school ASP.NET web service client that uses components (Component, IComponent, etc.) that are not supported on the Universal Windows Platform https://msdn.microsoft.com/en-us/library/windows/apps/mt185499.aspx

    Instead, you can use Visual Studio to generate WCF bindings for you. Simply right-click your project then click Add > Service Reference.

  • Yes, I changed that.
    Now instead I just generate a cs file from the WSDL and added it to the Asset\WebClient
    That part works well.

    But when I try to build the Windows App project from Unity, I get the following error now:

    Assets\WebClient\MyOwnWS.cs(2126,79): error CS0433: The type 'AsyncCompletedEventArgs' exists in both 'System.ComponentModel.EventBasedAsync, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Sign In or Register to comment.