Ticket Q459374
Visible to All Users

Failed to generate code for the service reference

created 12 years ago

I am in the process of moving all of my development onto a different PC. I have installed Visual Studio 2010, and copied my projects to the new PC. When I open one of the solutions--it's a large solution with several projects, including a website--I get the following error when I build:

Reference.svcmap: Failed to generate code for the service reference 'WindfallGlobalServices'. Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Type 'DevExpress.XtraPivotGrid.Customization.PivotCustomizationTreeNodeBase' is a recursive collection data contract which is not supported. Consider modifying the definition of collection 'DevExpress.XtraPivotGrid.Customization.PivotCustomizationTreeNodeBase' to remove references to itself. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IServices'] Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on. XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IServices'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IServices'] 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_IServices'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='Services']/wsdl:port[@name='BasicHttpBinding_IServices']

I only get this on the new PC…not the old one. I've tried looking for an answer via Google and the support tickets here, but have not found a solution. Would you have any idea what might be causing this? I can send you the project, but it would be about 46MB (with the App_Themes directory included). I have tried removing all of the service references (4 of them) and re-adding them. I've tried turning off the "Reuse types in referenced assemblies". Nothing, so far, has worked. I understand that this most likely is no related to your product, but I need to start somewhere.

This is rather crucial to getting my work done, so I have marked this ticket as urgent. I can't fully switch to the new PC until I get this resolved. I have moved PCs before, but I have never run into this issue before. Plus, I have not had WCF service references before.

Thanks,
Kevin

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Thank you for your report. This is a really unusual issue. I have not heard about a similar problem before. I have googled for a solution and found some similar problems on the web connected with different products. Please refer to the following links that I hope will provide useful information:
Getting “Recursive collection data contract” when referencing a WCF service with a slightly complex method
Type * is a recursive collection data contract which is not supported.

    Show previous comments (4)
    DevExpress Support Team 12 years ago

      I am happy to hear that the problem does not appears so far. Thank you for informing me.
      I am looking forward to hearing about your progress.

        To do this: right click your service reference, then click Configure Service Reference…
        Under "Reuse types in referenced assemblies" select the second option to specify in which assemblies to search for reused types and select all assemblies but uncheck DevExpress assemblies"

        DevExpress Support Team 11 years ago

          I am afraid your last comment is not quite clear to me. Would you please clarify the issue in greater detail? I am looking forward to hearing from you.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.