Add Service Reference, unable to generate code error resolution for services
My solution is SILVERLIGHT+WCF application, done Cretiria defines the need to run the pre-defined unit Test first after the service-side code is finished, ensuring that the service runs correctly before the client uses the service. Before I create the unit test, I need to add a reference to the WCF service in the test project, and then an error occurs.
Custom tool error: Failed to generate code for the service reference ××××××. Please check other error and warning messages for details.
WCF Service中包含一些比较复杂的逻辑定义,并且引用了一些自己定义的组件,项目本身是可以编译通过的,但是就是无法被添加Service Reference。重新编译了服务本身,并且检查了配置,Update Service Reference仍然无法解决问题。
通过查看发现,还是在生成服务代码的时候出现了问题,于是点击“Configure Service Reference…”按钮来配置对服务的引用:
In the popup dialog box, remove the option to "reuse types in referenced assemblies" to resolve the issue.
Problem: Custom tool error:failed to generate code for the service reference ' Appvot; results: Adding service Reference, unable to generate code errors for service Method