Custom Tool Warning Cannot Import wsdl portType

· January 12, 2009

I chased this bug for a while and got increasingly frustrated. Here’s what happened: I updated a WCF Service Reference and encountered the error (or actually a warning) in the Error List of Visual Studio. Additionally, the Reference.vb file was completely empty.

After some experimentation and frustration (why do I always try things myself before searching for a solution?), I decided to look online. Fortunately, I found the answer quickly.

Travis Spencer’s blog provided a solution. Although the title and description of the post were quite different, the solution was what I needed.

In the “Configure Service Reference” dialog box, there is an option called “Reuse types in referenced assemblies.” This option is a bit vague in its purpose—essentially, it means the tool attempts to download the assemblies that the service is referencing.

To solve the issue, you don’t need to fully understand this setting. Simply uncheck the “Reuse types in referenced assemblies” box and regenerate the reference. This should resolve the problem!

Service Reference Settings Dialog Box

Twitter, Facebook