Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
868 views
in Technique[技术] by (71.8m points)

web services - Version-control: svcmap, disco, xsd, wsdl, svcinfo and datasource files

We have a webservice named, let's say Foo.

So there is a Foo.svc file and a code behind Foo.svc.cs.

We add a silverlight project and wish to use the Foo.svc services so we add a Service Reference and call it's namespace FooBar.

This creates the following files :

  • Reference.cs
  • Reference.svcmap
  • Foo.xsd
  • Foo.disco
  • configuration.svcinfo
  • Foo.wsdl
  • Also various *.datasource files.

Over time we update the Foo.svc and add more Web Services (methods and interfaces) and the number of files in the FooBar directory is growing.

I have 26 Foo(nn).xsd files in this directory - where nn = 1 to 26.

My configuration.svcinfo is upto configuration91.svcinfo.

My question is this? Do any of these files need to be version controlled? Can they all be deleted each time you do a build deploy (as long as you do an update service reference)?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The Reference.svcmap file is practically the definition of the service reference. It contains the different settings as well as source links. Reference.svcmap should definitely be source controlled because it is actually THE service reference in the sense of project items.

Reference.cs contains the generated contracts and proxy against which your code is compiled. Whether to source control or not to source control the file is up to you. Generally, this is part of the project code and should be source controlled, but being auto-generated it can sometimes lead to accidental breaking check-ins.

All of the other files are TEMPORARY files used when generating the contract and proxy code. Together they form the sum of the metadata exposed by the service which includes service contracts (*.wsdl), data contracts (*.xsd) and configuration information (*.svcinfo).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...