Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 Error Reference.svcmap throwing Error

Started using Visual Studio 2012 RC since yesterday, We have one WCF solution. Whenever i try to use the "add/remove reference" dialog in another solution, I get below error after adding the service.

Error 1 Reference.svcmap: Failed to generate code for the service reference 'DPService'. Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Type 'WebSupergoo.ABCpdf8.Objects.Bookmark' is a recursive collection data contract which is not supported. Consider modifying the definition of collection 'WebSupergoo.ABCpdf8.Objects.Bookmark' to remove references to itself. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IGQDynamicPackaging'] 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='IGQDynamicPackaging'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='WSHttpContextBinding_IGQDynamicPackaging'] 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='WSHttpContextBinding_IGQDynamicPackaging'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='GQService']/wsdl:port[@name='WSHttpContextBinding_IGQDynamicPackaging'] App_WebReferences/DPService/

Please note that : The said service was working properly when i used VS 2010. For your reference, We are using "Reuse types in referenced assemblies " turned on and "reuse types in all referenced assemblies" option checked.

The same settings was working ok with VS 2010 and we can add reference . But now, After installing VS 2012 RC , I can't able to add the reference for both of the VS 2010 and VS2012. Any soluton or work around for this.

I just want to rollback and want to use VS2010, "add service " gives the same reference error in VS 2010 now.

like image 742
amaz Avatar asked Jun 20 '12 04:06

amaz


1 Answers

I had a similar problem and I unchecked the "Reuse Types in referenced assemblies" checkbox in the Configure Service reference dialog.

1) Right click on Service Reference 2) Select Configure Service Reference 3) Uncheck "Reuse types in referenced assemblies"

I'm not sure of all of the ramifications of doing this but it got me through to be able to use the reference again.

like image 118
Hoakie Avatar answered Sep 21 '22 02:09

Hoakie