生成带有 XML 注释的 WCF(Windows 服务托管)客户端代理类?
我有一个小问题,我还没有找到解决方案。我正在开发一个简单的 WCF 服务(VS2010、.NET 4.0、Windows 服务托管)。
我无法控制客户端,因此我需要让程序员尽可能简单地使用我的 WCF 服务。
我的想法是只向客户端程序员提供当我浏览到我的服务时获得的网址。 svcutil.exe http://localhost:7070/Historian.WCFSvc/mex.
问题是,当我生成在 url 上执行 svcutil.exe 的代理类时,我没有获得智能感知的 XML 注释?!?!
我用谷歌搜索并偶然发现了这个: http://msdn.microsoft.com/en -us/library/aa717040.aspx
我从示例项目中窃取了代码,但我很快意识到仅仅提供我的服务的 url 是不够的。
我真的不明白如何使其工作,如何将 WsdlDocumentation 属性传递给生成的代理类?!我想我需要一个指南或类似的东西来引导我完成这个过程。有人使用过这个示例代码并可能帮助我进行演练吗?
示例代码的下载页面位于我链接到的页面的底部。 (由于我是新来的,所以只能发布一个链接......抱歉!)
I have a small problem which I haven´t found a solution to. I'm developing a simple WCF service (VS2010, .NET 4.0, windows service hosted).
I have no control over the client side, and therefore I need to make it as simple as possible for the programmer to use my WCF service.
My idea is to just provide the client side programmer with the url you get when I browse to my service. svcutil.exe http://localhost:7070/Historian.WCFSvc/mex
.
The problem is that when I generate the proxy class executing the svcutil.exe on the url I don't get the XML-comments for the intellisense?!?!
I googled around and stumbled upon this: http://msdn.microsoft.com/en-us/library/aa717040.aspx
I stole the code from the sample project but I quickly realized that just providing the url to my service is not enough.
I don't really understand how to make it work, how to pass the WsdlDocumentation attributes to the generated proxy class?! I guess I need a guide or similar that walks me through this. Has anyone used this sample code and perhaps help me with a walkthrough?
The download page for the sample code is located at the bottom of the page I linked to. (Since I'm new here I can only post one link...sorry!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经使用下面的代码生成我的代理类有一段时间了,它们似乎继承了 xml 注释,也许你可以尝试一下
祝你好运:)
I have been using the below for a while to generate my proxy classes and they seem to inherit the xml comments, perhaps you coud try this
Good luck :)