{"id":290,"date":"2013-04-13T08:18:37","date_gmt":"2013-04-13T08:18:37","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=290"},"modified":"2013-04-13T08:18:37","modified_gmt":"2013-04-13T08:18:37","slug":"service-reference-failure-cannot-import-wsdlporttype","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/service-reference-failure-cannot-import-wsdlporttype\/","title":{"rendered":"Service Reference Failure &#8211; Cannot import wsdl:portType"},"content":{"rendered":"<p>Got an interesting exception whilst adding a service reference to a project, as seen below<\/p>\n<p><em><br \/>\nCustom tool warning: Cannot import wsdl:portType<br \/>\nDetail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter<br \/>\nError: Could not load file or assembly &#8216;NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c&#8217; or one of its dependencies. The system cannot find the file specified.<br \/>\n<\/em><\/p>\n<p>Luckily there&#8217;s an easy fix &#8211; right mouse click on the reference under the Service References section of the solution and select <strong>Configure Service References<\/strong><\/p>\n<p><a href=\"http:\/\/putridparrot.com\/blog\/wp-content\/uploads\/2013\/04\/ConfigureServiceReference.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/putridparrot.com\/blog\/wp-content\/uploads\/2013\/04\/ConfigureServiceReference-292x300.png\" alt=\"ConfigureServiceReference\" width=\"292\" height=\"300\" class=\"alignnone size-medium wp-image-291\" srcset=\"https:\/\/putridparrot.com\/blog\/wp-content\/uploads\/2013\/04\/ConfigureServiceReference-292x300.png 292w, https:\/\/putridparrot.com\/blog\/wp-content\/uploads\/2013\/04\/ConfigureServiceReference-624x640.png 624w, https:\/\/putridparrot.com\/blog\/wp-content\/uploads\/2013\/04\/ConfigureServiceReference.png 649w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/a><\/p>\n<p>And as shown, select Reuse types in specified referenced assemblies and check the NLog assembly. <\/p>\n<p>I need to update this post with the whys and wherefores of this change, but it works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Got an interesting exception whilst adding a service reference to a project, as seen below Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Could not load file or assembly &#8216;NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c&#8217; or one of its dependencies. The system cannot find the file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-290","post","type-post","status-publish","format-standard","hentry","category-wcf"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=290"}],"version-history":[{"count":4,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":295,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/290\/revisions\/295"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}