Feb 28, 2018

.NET Core 2.0 SOAP platform not supported error

For developing SOAP / WCF services use:

System.ServiceModel.Http  NUPackage

Use SVCUTIL to generate proxy from WSDL file or url.

If you get error :

PlatformNotSupportedException: Compiling JScript/CSharp scripts is not supported

read this:

https://github.com/dotnet/wcf/issues/2219

Put this before Client method call:

    MethodInfo method = typeof(XmlSerializer).GetMethod("set_Mode", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
    method.Invoke(null, new object[] { 1 });

No comments:

Post a Comment