服务参考在不同的计算机上更新不同的数据源文件 [英] Service Reference update different datasource files on different machines

查看:83
本文介绍了服务参考在不同的计算机上更新不同的数据源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我们正在使用Visual Studio 2015 Update 3.

We are using Visual Studio 2015 Update 3.

当我更新服务引用时,会得到如下数据源文件:

When I update a service reference, I get datasource files like this:

<?xml version="1.0" encoding="utf-8"?>
<!--
    This file is automatically generated by Visual Studio .Net. It is 
    used to store generic object data source configuration information.  
    Renaming the file extension or editing the content of this file may   
    cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="DisApproveDuties_Result" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
   <TypeInfo>Mysolution.Web.Api.NavResourceHoursService.DisApproveDuties_Result, Service References.NavResourceHoursService.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

当我的同事在他的计算机上更新相同的服务参考时,他会得到以下信息:

When my colleague is updating the same service reference on his machine he get this:

<?xml version="1.0" encoding="utf-8"?>
<!--
    This file is automatically generated by Visual Studio .Net. It is 
    used to store generic object data source configuration information.  
    Renaming the file extension or editing the content of this file may   
    cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="DisApproveDuties_Result" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
   <TypeInfo>Mysolution.Web.Api.NavResourceHoursService.DisApproveDuties_Result</TypeInfo>
</GenericObjectDataSource>

请注意TypeInfo元素值的差异.

Note the difference in the TypeInfo element value.

我不知道为什么会这样.有什么想法吗?

I can't figure out why this is happening. Any ideas?

但这很烦人,因为它会在源代码管理中生成不必要的文件更改.

But it is annoying as it generates unnecessary file changes in source control.

如果有一个选项可以禁用这些数据源文件的生成,那就更好了.但是我找不到.

It would be even better if there was an option to disable generation on these datasource files. But I can't find that.

关于Jaap的问候

推荐答案

嗨Jaap,

您是否在WCF客户端中使用了数据实体来绑定控件?作为我在VS2013下进行的测试,似乎该数据源文件不会自动生成.如果我通过View-> Other Windows-> Data Sources-> your在WCF客户端中浏览我的数据实体 服务参考->您的数据实体,则将生成数据源文件.

Did you use the Data Entities in WCF client to bind controls? As my test under VS2013, it seems this datasource file would not generate automatically. If I browser my data entities in WCF client by View->Other Windows->Data Sources->your service reference-> your Data Entities, then the datasource file would be generated.

如果您不打算在客户端使用这些数据实体,则可以直接将其删除,这不会影响您的WCF客户端功能.这些文件用于通过WCF服务数据绑定客户端控件.

我不确定它是否与VS版本有关,建议您从下面的链接中尝试建议.

#什么是WCF服务参考.datasource文件?

http://stackoverflow.com/questions/1439364/what-are-the-wcf-service-reference-datasource-files

最好的问候

爱德华


这篇关于服务参考在不同的计算机上更新不同的数据源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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