- Home /
svcutil Generated File unity UWP errors
Using Unity to create a Hololens (UWP) application that talks to a WCF host. I have used this tutorial to create the client to talk to my host. Using svcutil to generate the proxy just like in the tutorial.
When I run the code inside of unity by pressing the play button, it runs perfectly with no errors. BUT when I build the project it gives me a lot of errors with the generated code. I have placed code snippets and error messages at the bottom.
Not sure if this is an issue with svcutil or the way unity compiles to UWP. Any help would be appreciated, thank you.
Tutorial link: http://gyanendushekhar.com/2016/04/21/how-to-call-wcf-service-in-unity
This is one of the lines that is giving me trouble:
[System.ServiceModel.OperationContractAttribute(IsOneWay = true, Action = "http://tempuri.org/...")]
These are the errors:
error CS0433: The type 'OperationContractAttribute' exists in both 'System.ServiceModel.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
error CS0246: The type or namespace name 'IsOneWay' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'Action' could not be found (are you missing a using directive or an assembly reference?)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612171029im_/https://answers.unity.com/themes/thub/images/avi.jpg)