What are the WCF Service Reference .datasource files?

Andy White picture Andy White · Sep 17, 2009 · Viewed 31.6k times · Source

What are the .datasource files that are automatically generated by "Create Service Reference" in Visual Studio? The comment in the file is this:

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.

However, it sounds like these files are optional, so I'm wondering what they are used for. I'm also wondering if it is truly safe to delete them, since they often cause path length problems on XP.

http://www.eggheadcafe.com/conversation.aspx?messageid=34104031&threadid=34104026

Can anyone point me to some official MS documentation on these files?

Answer

tomasr picture tomasr · Sep 17, 2009

As far as I remember, they are just generated so that you can use the data contracts used in the service as object data sources for data binding against UI controls.