我在我的WCF服务中添加了两个额外的方法,现在我想更新我的服务引用,但由于某些我似乎无法弄清楚的原因,它仍然会出错。它会在尝试加载EntityFramework version 4.4.0.0
时发出警告。
我实际上并没有使用EntityFramework
,而是从项目中删除了它的所有引用。我运行了PM> Uninstall-Package EntityFramework -Force
并删除了EntityFramework
中web.Config
的所有遗留物。删除的引用也是版本5.0.0.0。
该项目甚至不需要参考,以及为什么要加载4.4版本?
项目构建良好以及服务,但它不会生成更新的引用。
编辑:
这是错误。
Custom tool error: Failed to generate code for the service reference 'DeployService'. Please check other error and warning messages for details.
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 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 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='IDeployService']
此外,如果我将其设置为在引用程序集中重用类型
,我只会收到此错误更新:
如果有人可以提供问题的实际解决方案,我将暂停此故障单。
我能够通过使用"在特定参考组件中重用类型来获得更新以处理我的项目。而不是"在所有引用的程序集中重用类型"。这样做我选择不重用任何Microsoft程序集,而只选择我需要保持相同的程序集,即对我自己的实体的引用。重新使用Microsoft程序集(在本例中为实体框架)的问题导致了问题。