WCF Custom tool warning “Cannot import wsdl:portType”

Yet another odd problem to deal with today. “Custom tool warning: cannot import wsdl:portType Could not load file or assembly”Capture

Thanks to Nuget, it appears that it tries to load all assemblies when “Reuse types in all referenced assemblies” is marked.

Capture

The WSDL tool doesn’t use the below setting so it fails.

[code langauge=”xml”]
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="RabbitMQ.Client" publicKeyToken="89e7d7c5feba84ce" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.4.3.0" newVersion="3.4.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
[/code]

Un-check, deselect, “Reused types in referenced assemblies” and your problems will go away, just don’t check the offending assembly again 🙂 If you have to use that assembly, for your project file to the correct version.