Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com
You can refer to the following thread about how to configure and publish application including a SQL Compact database file (.sdf):
TechNet Community Support
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?