How to: Publish Data Files in a ClickOnce Installer
ClickOnce installers automatically deploy data files if the file extension is .mdf, .ldf, or .xml. For all other data files, you must add the file to your project as a link and change the Copy to Output Directory property to Copy Always.
Applies to: The information in this topic applies to document-level projects and application-level projects for Microsoft Office 2010 and the 2007 Microsoft Office system. For more information, see Features Available by Office Application and Project Type.
Adding a Data File as a Link
The following procedure demonstrates how to add a data file in your project.
To add a data file as a link
In Solution Explorer, click the project name.
On the Project menu, click Add Existing Item.
Browse to the data file, and click the arrow next to the Add button.
Click Add as Link.
In Solution Explorer, click the data file.
In the Properties window, set the Copy to Output Directory property to Copy always.