Export (0) Print
Expand All

How to: Publish Data Files in a ClickOnce Installer

Visual Studio 2010

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.

The following procedure demonstrates how to add a data file in your project.

To add a data file as a link

  1. In Solution Explorer, click the project name.

  2. On the Project menu, click Add Existing Item.

  3. Browse to the data file, and click the arrow next to the Add button.

  4. Click Add as Link.

  5. In Solution Explorer, click the data file.

  6. In the Properties window, set the Copy to Output Directory property to Copy always.

Community Additions

ADD
Show:
© 2014 Microsoft