Add the files to your project. Mark the Build Action as Content
and the Copy to local directory
to Always
. Then it will include the files with your deployment.
You can also check the Application Files dialog to see if they are there. And if the files have a file extension of XML or something that indicates data, you want to change the option from Include(Data)
to Include
or Include(Required)
. If you include a file as data, it is put in the DataDirectory after deployment.
- Select a data file in Solution Explorer.
- In the Properties window, change the Build Action property to the Content value
2. To mark files as data files
- With a project selected in Solution Explorer, on the Project menu, click Properties.
- Click the Publish tab.
- Click the Application Files button to open the Application Files dialog box.
- In the Application Files dialog box, select the file that you wish to mark as data.
- In the Publish Status field, select Data File from the drop-down list.
3. To mark files as prerequisites
- With a project selected in Solution Explorer, on the Project menu, click Properties.
- Click the Publish tab.
- Click the Application Files button to open the Application Files dialog box.
- In the Application Files dialog box, select the application assembly (.dll file) that you wish to mark as a prerequisite. Note that your application must have a reference to the application assembly in order for it to appear in the list.
- In the Publish Status field, select Prerequisite from the drop-down list.
Source: MSDN - How to: Specify Which Files Are Published by ClickOnce