SVCUtil“更新服务参考"等效命令参数 [英] SVCUtil "update service reference" equivalent command parameters

查看:21
本文介绍了SVCUtil“更新服务参考"等效命令参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过使用 SVCUtil 更新 Visual Studio 2010 解决方案中的服务引用,因为该解决方案有多个项目,并且逐一刷新引用并不好.

I want to update service references in a Visual Studio 2010 solution by using SVCUtil because this solution has several projects and it's not good to get references refreshed one by one.

我想知道您的观点,因为我必须确保我将执行与 Visual Studio 2010 完全相同的命令,或者即使 Visual Studio 2010 不使用 SVCUtil,命令到 IDE 的行为.

I'd like to know your point, because I've to be sure I'm going to execute exactly same command than one done by Visual Studio 2010, or even if Visual Studio 2010 doesn't use SVCUtil, an equivalent command to IDE's behavior.

非常感谢.

推荐答案

一些谷歌搜索 这里此处 显示了 VS 2008 上的设置,尽管这当然取决于您在添加服务引用"向导中的高级"选项中的选项.

Some googling here and here shows the settings on VS 2008, although this will depend of course on your options in the Advanced options in the Add Service Reference wizard.

同意 - 永远不要害怕从头开始删除和重新创建服务引用.当使用像 TFS 这样的版本控制时,更新"服务引用通常会很混乱,因为它会计算出哪些 wsdl、xsd 和迪斯科文件等已被更改、添加或删除等(并获得像 SomeXSD92.xsd 这样的文件名).通常,删除并重新创建它们会更快.

Edit : Agreed - Never be afraid to drop and recreate service references from scratch. When working with version control like TFS, "update" service references there is often quite a mess as it figures which wsdl, xsd and disco files etc have been changed, added or deleted etc (and get filenames like SomeXSD92.xsd). Generally it is quicker to just drop and recreate them.

Johan 的帖子提出了一个很好的观点(并且可以用作名为 服务代理,它处理客户端代理的实现).当您说两层需要引用同一个程序集时,我不太确定您的意思是什么?如果您要共享服务中调用的实体的类型,则无论如何都需要在大多数层中引用实体程序集.对于您的服务代理程序集项目(其中包含所有服务引用),您可以重新公开 WCF 服务器使用的相同服务合同,也可以将其包装在新接口中.

Johan's post is makes a good point (and can be used as part of a standard design pattern called Service Agent which handles the implementation of the client proxy). I'm not quite sure what you mean when you say two tiers would need to reference the same assembly? If you are sharing type of the entities called in the service you would need to reference the entity assembly in most tiers anyway. For your Service Agent assembly project (which has all the service references) you can either re-expose the same Service Contract used by the WCF server or wrap it in a new interface.

这篇关于SVCUtil“更新服务参考"等效命令参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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