在 VS2010 中更新我的服务引用导致我在 TFS Pending Changes 中添加了大量文件
我有一个包含多个 Silverlight 4.0 应用程序的解决方案,它们都通过通用的 Silverlight 4.0 程序集引用相同的 WCF 服务。也就是说,每个 Silverlight UserControl 应用程序都引用一个名为“ServiceClient”的 Silverlight 程序集(也在解决方案中),以获取其通用的 OperationContract 信息。这些 UserControl 应用程序引用该程序集。
当我更改 WCF 服务时,我必须更新“ServiceClient”程序集。这会导致大量 *.datasource 文件以及 ServiceName.xsd、ServiceNameN.wsdl、ServiceNameN.disco(其中 N 是任意整数)。所有这些文件都在 TFS 中列为待处理的更改。然后我必须小心地撤消可能数百个特定的待处理更改。有没有办法限制文件生成或至少抑制它们显示为待处理的更改?
I have a solution with multiple Silverlight 4.0 applications, which all reference the same WCF service through a common Silverlight 4.0 assembly. That is each of the Silverlight UserControl applications reference a Silverlight assembly called "ServiceClient", also in the solution, to get their common OperationContract information. These UserControl apps reference that assembly.
When I change the WCF service I must update the "ServiceClient" assembly. This causes a large number of *.datasource files, and ServiceName.xsd, ServiceNameN.wsdl, ServiceNameN.disco (Where N is an arbritrary integer). All of these files are listed as pending changes in TFS. I must then carefully undo maybe hundreds of specific pending changes. Is there a way to limit file generation or at least supress their showing up as pending changes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您不“撤消”待处理的更改并签入,会发生什么?
如果文件已签入,则它们已更改。这不是您想要的吗?
我有时会看到 VS/TFS 将文件设置为待处理签入 -但是当我执行签入时,文件列表被清除并且文件没有签入(因为文件中实际上没有任何更改)
也许您正在努力解决一个非问题。
If you do not 'Undo" the pending changes and check-in, what happens?
If the files are checked-in then they were changed. Isn't that what you want?
I sometimes see VS/TFS set files to pending check-in, but when I perfrom the check-in the file list is cleard and the files are not checked-in (because there was really nothing changed in the files).
Maybe you are struggling with a non-issue.
目前尚不清楚为什么要在服务参考更新后撤消自动生成的更改。当您购买 VS 服务参考方法时,这就是行李的一部分。
如果您想更好地控制客户端生成过程,可以使用 SvcUtil 命令行< /a> 实用程序。如果您想模仿“添加服务引用”方法,则必须将构建任务添加到项目中才能执行此操作。我建议使用一个连接的项目来使用 SvcUtil 生成所有其他项目都会引用的客户端程序集。不过,您仍然需要将 WCF 配置文件添加到引用客户端程序集的每个项目中。
It's not clear why you are undoing the automatically generated changes after a service reference update. When you buy into the VS Service Reference method that's part of the baggage.
If you want more control of the client generation process, you can use the SvcUtil command line utility. You will have to add build tasks to your projects to perform this if you want to mimic the Add Service Reference approach. I'd recommend going with a single project wired to use SvcUtil to produce a client assembly that all the other projects would reference. You still would need to add the WCF config file to each of the projects that reference your client assembly though.
您可以只引用 tfs 中包含服务合同的库,然后使用该合同创建到您的 wcf 服务的通道吗?这也意味着您不必再使用服务引用,并且还将 silverlight 应用程序与服务解耦。
Could you just reference the library in tfs which has you're service contracts, then use the contract to create a channel to your wcf service. Which would also mean you don't have to use a service reference anymore and also decouples your silverlight application from your service.