Search This Blog

Saturday, March 2, 2013

WCF error: "Custom tool warning: Cannot import wsdl.portType"

An error that comes up when moving code which calls a WCF service from development to production:

"Custom tool warning:  Cannot import wsdl:portType"

It also details a number of "custom tool" errors.

The problem stems from when I pull some Visual Studio Solution code over from my development lab, delete the service references in the projects in the solution (which point to the WCF service in the devlab) and re-add them as service references pointing to the WCF service in the production lab.

Evidently a lot is going on during the creation of these service references -- when Googling for information on it other users recommend completely shutting down and restarting Visual Studio; the best recommendation comes from stackoverflow and recommends re-adding these references while specifying not to reuse types in reference assemblies:

http://stackoverflow.com/questions/1872865/what-does-this-wcf-error-mean-custom-tool-warning-cannot-import-wsdlporttype

http://www.lukepuplett.com/2010/07/note-to-self-don-let-wcf-svcutil-reuse.html


1 comment:

bk said...

this is my favorite blog ever.