我在一个项目中有三个项目,一个是数据库层,第二个是 WCF,第三个是使用这两个项目的主站点,所以我在调试时出错
Error 203 'CIService.CIServiceClient' does not contain a definition for 'GetInventoryProjectDetailCompleted' and no extension method 'GetInventoryProjectDetailCompleted' accepting a first argument of type 'CIService.CIServiceClient' could be found (are you missing a using directive or an assembly reference?) G:\Design Scoring\InspectionEvaluation\ProjectDetails.aspx.cs 30 27 G:\Design Scoring\InspectionEvaluation\
在以下代码行中,
CIService.CIServiceClient svcClient = new CIService.CIServiceClient();
svcClient.GetInventoryProjectDetailCompleted += new EventHandler<CIService.GetInventoryProjectDetailCompletedEventArgs>(svcClient_GetInventoryProjectDetailCompleted);
svcClient.GetInventoryProjectDetailAsync(consultantId, projectId);
此代码来自使用 WCF 服务方法“GetInventoryProjectDetailCompleted”的主站点,我在主站点中也添加了 WCF 参考,在网上检查它我得到了在 web.config 文件中添加参考的解决方案,如图所示,
<add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
希望你的建议
谢谢