Custom tool warning cannot import wsdl:portType

· January 12, 2009

I chased this bug for a while - more and more frustrated… This was what happened: I updated a WCF Service Reference and got this error (or actually warning) in the Error List of Visual Studio. Also I saw that the Reference.vb was totally empty.

OK - after some trying of my own (why do I do that over and over? Don’t think - steal from others…) I though of searching the Net and of course found the answer in five seconds.

Here is a guy that solved it - but the header and description of the post is quite different so I’ll try to give my own explanation here.

In the Configure Service Reference… dialog box there is an option “Reuse types in referenced assemblies”. Exactly what that means is hard to grasp (<a href=”” data-reuse+types+in+referenced+assemblies”&meta=” target=” data-_blank”=”“>just try for yourselves</a>) - but I understand it as the tool tries to download the assemblies that the service is referencing.

The solution, however, don’t have much to do with understanding that (if you don’t want to) - simply clear that box and regenerate. It works!

Twitter, Facebook