Share via


Application Files Dialog Box

This dialog box allows you to specify how the files in your project are categorized for publishing, dynamic downloading, and updating. It contains a grid that lists the project files that are not excluded by default, or that have a download group.

To access this dialog box, select a project node in Solution Explorer, then on the Project menu, click Properties. When the Project Designer appears, click the Publish tab. On the Publish page, click the Application Files button.

The grid shows the File Name, Publish Status, and Download Group for each file. Starting in Visual Studio 2008 SP1, a Hash column also appears in the grid.

Publish Status

The Publish Status of a file determines how it will be treated during publishing, updating, and dynamic downloading. The significance of each Publish Status option is shown in the following table. Notice that only the Publish Status options that apply to a particular file type are displayed in the Publish Status drop-down list for a file of that type.

Publish Status option

Description

File types to which this option applies

Data File

Include the data file in the manifest and copy to the publish location when the publish command is executed.

Any non-assembly file for which Build Action is set to Content can have this publish status. Files with extensions .mdf, .ldf, and .xml are set to Data File by default.

Files of this type will be installed to the data directory. When an update to the application occurs, a data file may be migrated by the application.

When an update to the application occurs, migrate the information in this file into the next version of the application.

Non-assembly files

Include

Include the file in the manifest and copy to the publish location when the publish command is executed. Files of this type will be installed to the program file folder, where the application's executable (.exe) files and assemblies reside.

All files

Exclude

Exclude the file from the manifest and do not copy to the publish location when the publish command is executed.

All files

Prerequisite

Include the file in the manifest and do not copy to the publish location when the publish command is executed. Block the installation if this file is not already present in the GAC (global assembly cache). It is up to the end user to install the prerequisite.

Only strong-name signed assemblies should be marked as prerequisites.

Assembly files

For data files, the migration does not overwrite user changes on the client computer. For information on how database files are migrated, see Accessing Local and Remote Data in ClickOnce Applications.

If you select one of the (Auto) options in Publish Status, such as Include (Auto), the Publish Status of the file is determined automatically based on the following rules:

  • .pdb files are excluded by default.

  • .mdf, .ldf, .mdb and .xml files are set to Data File by default.

  • The <assembly_name>.xml file is excluded by default.

  • All other content files for which Build Action is set to Content have a default of Include. Any content files for which Build Action is not equal to Content are not shown in the Application Files dialog and will not be published.

Include and Exclude override the automatically determined (Auto) options.

Download Group

You can organize the files in your application by creating a new Download Group. You can download limited section of an application during the initial install and download other sections during run-time by using the DownloadFileGroup method. For example, you can use download groups for localized resources and download a specific download group for each locale. For more information, see How to: Specify Which Files Are Published by ClickOnce.

Hash

Starting in Visual Studio 2008 SP1, you can choose which files to hash. This dialog box includes a Hash column that provides the option to include or exclude files from the generated hash.

If you set a file's Hash setting to Exclude, a warning is displayed in that file's record in the grid. The warning "A project that contains non-hashed references cannot be signed" is displayed even if the Sign the ClickOnce manifests option on the Signing page is not selected. If you intend to publish the application together with unsigned manifests, you can safely ignore this warning. If the application is configured to publish with signed manifests, a build error will be thrown. For more information, see How to: Sign Application and Deployment Manifests.

See Also

Reference

Publish Page, Project Designer

Change History

Date

History

Reason

September 2009

Added information about download groups

Customer feedback.

July 2008

Added sentence about new Hash column.

SP1 feature change.

July 2008

Added clarification to the description of the Include option.

Customer feedback.

July 2008

Added information about optional hashing.

SP1 feature change.