在Visual Studio 2013中,我已经设置了WCF应用程序。我的设置与https://github.com/ninject/Ninject.Extensions.Wcf/tree/master/src/Examples上发布的示例完全相同。当我尝试从另一个项目导入我的服务引用时,我收到以下错误。我已经使用Nuget将Ninject.Extensions.Factory添加到WCF项目(和引用项目),但仍然得到相同的错误。
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: Could not load file or assembly 'Ninject.Extensions.Factory, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7' or one of its dependencies. The system cannot find the file specified.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IEnrollmentService'] C:\...\Reference.svcmap 1 1
答案 0 :(得分:0)
导入服务引用时,单击“高级”按钮,然后取消选中“#34;重用引用程序集中的类型"。