Web 参考和源代码控制
我有一个 C# 应用程序,它使用多个 Web 服务,这些服务已作为 Web 引用添加到我的项目中。我想知道我应该将哪些文件签入源代码管理。
在我的项目中,我的项目目录中有一个文件夹结构,如下所示:
Project
Web References
WS
WS.wsdl
Reference.cs
Reference.map
...misc .datasource and .xsd files
我应该将哪些文件放入源代码管理中?
谢谢
I have a C# application that uses several web services which were added to my project as web references. I want to know what files i should check into source control.
in my project there is a folder structure from my project directory that looks like this:
Project
Web References
WS
WS.wsdl
Reference.cs
Reference.map
...misc .datasource and .xsd files
Which of these files should i put in source control?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
建议将所有这些文件置于源代码控制之下,但这只是为了其他开发人员使用您的项目源代码的完整性,或者必须在任何新机器上执行签出/获取最新版本(在您的开发机器的硬盘坏掉之后) , ETC。)。
Visual Studio 构建 Web 引用后,所有这些文件都会构建并保持不变,直到您“刷新 Web 引用”。如果您自己修改它们,即更改数据类型或删除 XML 属性(对于一些晦涩的运行时 SOAP 问题,我必须这样做),然后也检查这些更改。
Suggest keeping all those files under source control, but only for completeness for other developers using your project's source code, or having to perform a Checkout/Get Latest on any new machine (after your dev machine's hard drive dies, etc.).
Once Visual Studio builds the web reference, all those files are built and remain unchanged until you 'Refresh Web Reference'. If you modify them yourself, i.e. change a datatype, or remove an XML attribute (I've had to do that for some obscure runtime SOAP problem), then check those changes in as well.
如果您的 nant 脚本或 Visual Studio 解决方案或您在每个构建上重建任何特定文件,那么不要签入这些文件,因为它只会导致混乱。否则请全部检查。
If your nant script or visual studio solution or what have you rebuilds any particular files on each build, then don't check those in, as it'll just lead to confusion. Otherwise check it all in.