无法在VS 2010中导入wsdl:portType - 不常见的答案

时间:2012-04-25 19:24:53

标签: wcf visual-studio-2010 wsdl svcutil.exe

我像其他人一样得到这个,但是根据建议取消选中重用并没有帮助我。我有一个带有IIS 7.5的Windows 7操作系统。有什么想法吗?

Warning 1   Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension:     System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Schema with target namespace 'http://mybpservice/2012-03' could not be found.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://mybpservice/2012-03']/wsdl:portType[@name='IBPService']  

在VS 2010中添加服务引用“查看服务和操作”但不生成任何代码。

1 个答案:

答案 0 :(得分:0)

我的问题已经解决了......

我必须在控制面板中添加WCF 3.5,然后再将其删除。这似乎解决了我的问题。然后我在我提到的两项服务上添加了我的参考资料。 然后有了SQL登录的问题,不得不在用户中添加到apppools的sql db中。 所以它与使用IIS 7.5的同一台WIndows 7机器上的ServiceModelReg.exe(3.0 vs 4.0)有关

现在我很高兴。