Call WCF service,

I have a UNITY IDE with Visual Studio 2017 and I’ am trying to call WCF service from Unity client. The service has been deployed as an Azure AppService. Into the client it has been integrated a client proxy generated by svutil into “Network” folder under the Assets as well as the .cs file which contains the service calls. Under the assets I have created a “Plugin” folder where I moved the System.ServiceModel.dll from …\Mono\2.0\ .
The call from the client is as follows:

using (TowerDefenseServiceClient client = new TowerDefenseServiceClient(new BasicHttpBinding(), EndpointAddress(“”)))


   result = client.SetMap(mapID);


It works in debug, but not release mode, and throws an Exception:

"System.PlatformNotSupportedException: Operation is not supported on this platform.

at System.AppDomain.DefineDynamicAssembly (System.Reflection.AssemblyName name, System.Reflection.Emit.AssemblyBuilderAccess access) [0x00000] in :0

at (wrapper remoting-invoke-with-check) System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName,System.Reflection.Emit.AssemblyBuilderAccess)

at Mono.CodeGeneration.CodeModule…ctor (System.String name) [0x00019] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ClientProxyGenerator.CreateProxyType (System.Type contractInterface, System.ServiceModel.Description.ContractDescription cd, System.Boolean duplex) [0x00026] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ChannelFactory`1[TChannel].CreateChannel (System.ServiceModel.EndpointAddress address, System.Uri via) [0x0003e] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ChannelFactory`1[TChannel].CreateChannel (System.ServiceModel.EndpointAddress address) [0x00000] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ChannelFactory`1[TChannel].CreateChannel () [0x00012] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ClientBase`1[TChannel].CreateChannel () [0x00006] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ClientBase`1[TChannel].get_InnerChannel () [0x0000b] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ClientBase`1[TChannel].Close () [0x00000] in <6507e191f318479b99452fbdc7f565d5>:0

at System.ServiceModel.ClientBase`1[TChannel].System.IDisposable.Dispose () [0x00000] in <6507e191f318479b99452fbdc7f565d5>:0

at Network.SetMap (System.Int32 mapID) [0x0002f] in <3ec07921d84a4a1ab08e28882b16dcbb>:0 "

Do you have any idea what caused the problem? Thanks for any advice.,

Hey, I met the same question as you. Is your problem solved? If it is solved, can you help me? Thank you!