有没有办法对WCF服务更新时,自动更新代理对象? [英] is there a way to automatically update proxy object when updating service on WCF?

查看:294
本文介绍了有没有办法对WCF服务更新时,自动更新代理对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有我工作的一个WCF Web服务。目前每天我改变了我在服务器端的服务合同的时候,我需要两个更新服务引用,并重新使用的客户端svcutil.exe的代理对象。反正是有自动一举两得?我曾经看到谁生成的客户端reference.cs文件内部有人,但我不知道他是如何做到这一点。我使用Visual Studio 2010中


到目前为止,所有我已经找到了不同的 MSDN 告诉我使用SvcUtil工具引用。它不是直观,通常工作时我能找到比CMD更容易的解决方案VS.


i have a WCF web service that i'm working on. currently every time i'm changing the contracts in my service at the server side, i need to both update the service reference and regenerate the proxy object used by the client with "svcutil.exe". is there anyway to do both automatically? i once saw someone who generated the client inside the reference.cs file but i have no idea how he did that. I'm using visual studio 2010.

so far all i have found was different msdn references telling me to use the svcutil. its not intuitive and usually i can find easier solutions than cmd when working with VS.

推荐答案

解决了。显然,我不得不取消在引用程序集复选框重用的类型,并有由SvcUtil工具生成的文件和文件reference.cs之间没有更多的区别。我想责怪微软,但它确实是有道理的。该死的。非常感谢大家。

Solved. Apparently i had to uncheck the reuse types in reference assemblies checkbox, and there was no more difference between the file generated by svcutil and the reference.cs file. I want to blame Microsoft but it really makes sense. Damn. Thanks a lot everyone

这篇关于有没有办法对WCF服务更新时,自动更新代理对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆