3

When I publish a web application that consumes a WCF service, the Service References folder, which contains some svcinfo, svcmap and wsdl files, is copied as well (tested with Publish to File System).

However, these files are not needed to run the application (although they are obviously required for developing and compiling the application). Why are they included, even if the project settings say that "Only files needed to run this application" should be deployed? Is this a bug in Visual Studio or is there some purpose behind this?

Community
  • 1
  • 1
Heinzi
  • 167,459
  • 57
  • 363
  • 519
  • 1
    Please refer the answer here: http://stackoverflow.com/a/12938111/3051661 This can Be help Know About This File – pankeel Jan 30 '14 at 10:12
  • @pankeel: The link explains the purpose of the files. I already know that they are required during design time. It does not explain why it is included during **deployment**! – Heinzi Jan 30 '14 at 10:47

2 Answers2

2

Never ceases to amaze me the amount of questions on here that fail to get the attention they deserve. Hopefully I can help you close this one off as it is a good question.

I believe it is simply for defining a contract. The Service References folder is more like meta data. You only use it for debugging and for discovering (hence *.disco) information about the service.

You should just exclude the folder from live sites as your web.config has all the run-time information about the service (URI, etc).

csharpforevermore
  • 1,472
  • 15
  • 27
-3

Please refer the answer here:

http://www.stackoverflow.com/a/12938111/3051661

http://blogs.msdn.com/b/lifenglu/archive/2007/05/08/files-in-a-service-wcf-references.aspx

http://social.msdn.microsoft.com/Forums/en-US/98ddcb48-6d59-4cb6-b1d4-b23735f4f713/scvmap-disco-xsd-wsdl-svcinfo-and-datasource-files?forum=silverlightweb

This can Be help Know About This File

pankeel
  • 1,138
  • 1
  • 10
  • 22
  • 2
    -1. While I do appreciate your taking the time to write an answer, I have read through all of the links and none of them even remotely answers the question. – Heinzi Jan 30 '14 at 10:45