Visual Studio 2012 does not create Service reference properly

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

When you add service reference you might figure out that proxy source code is empty:

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.17929
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

If you take a look under warnings after executing of Update Service Reference you will figure out following message (which is in fact a critical error):

Warning    7    Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='
http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IXService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='ControlOrderService']/wsdl:port[@name='BasicHttpBinding_IXService']   


This problem occurs only if you generate references with “Reuse Types in referenced assemblies”.

To workaround the problem, remove reference to Newtonsoft.Json.dll update service references manually and then add the reference to Newtonsoft.Json.dll again.


Posted Oct 05 2012, 12:20 PM by Damir Dobric
Filed under:

Comments

John wrote re: Visual Studio 2012 does not create Service reference properly
on 10-08-2012 21:55

Thanks. This resolved my issue!

Damir Dobric wrote re: Visual Studio 2012 does not create Service reference properly
on 04-01-2013 22:34

This issue has been resolved by following KB: support.microsoft.com/.../2750149 (Win8( or support.microsoft.com/.../2750147 (Other operative Systems)

developers.de is a .Net Community Blog powered by daenet GmbH.