添加WCF服务引用失败解决办法
最近在玩SL4 beta,寫了一個WCF的服務,在Silverlight Application中選擇Add Service Reference,填入服務地址,但在生成服務引用代碼(應該就是代理類)時發生錯誤:Error 7 Custom tool error: Failed to generate code for the service reference ‘xxx’. Please check other error and warning messages for details…進到Service References文件夾一看確實沒有生產代碼,Update Service Reference, 甚至刪了重新添加也沒有用。檢查WCF服務也沒有問題。而使用svcutil工具則能正常生成,但svcutil生成的引用代碼卻不能在SL中使用。
于是Google之,網上各種解決方法不能奏效,最后在此處找到強帖,關鍵內容如下:"Ok...Weird.? Closed the project and all other projects open.? Restarted the web service.? Reopened the project.? Deleted the reference to the web service.? Readded it.? All was fine and now it works." 簡單地說,就是:把VS關了再開。試了一下,果然可以。
在Microsoft Connect上已有人提交此bug。微軟的回復是:"Thank you for reporting the issue. This issue has been resolved in the latest version of VS2010. " 然而此回復的日期是11月16日,而我現在用的VS2010 beta2 依然有此問題。
轉載于:https://www.cnblogs.com/Gildor/archive/2009/12/17/1626057.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的添加WCF服务引用失败解决办法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: shell的debug模式
- 下一篇: 北京常用电话号码