Publish Web Dialog Box

The Publish Web dialog box enables you to build and publish a Web application project to a new location. You can use the Publish Web dialog box to find potential errors and compile-time errors in the Web.config file and in other non-code files before deploying a Web application project. Additionally, you can remove source code from the site. This provides a measure of protection for your intellectual property and makes it more difficult for others to access or tamper with the source code of your site.

To access this dialog box

  1. In Visual Studio, open a Web application project that you want to publish to a new location.

  2. On the Build menu, select Publish ProjectName.

Target location

Specifies the output path of the location at which the Web application will be published. The results are written to the specified location, overwriting (without warning) any existing content in that location. You can specify an FTP path, an HTTP path, or a physical drive.

Replace matching files with local copies

Updates the files that have changed at the target location to match the files on the local computer.

Delete all existing files prior to publish

Deletes existing files in the target location, and then copies all the project files for your selected Web application project to the target location.

Only files needed to run this application

Copies to the target location only the files that are required to successfully run the application. This includes all files in the Bin folder, and any files that have the Build Action property set to Content, such as .aspx files, .ascx files, and master pages.

All project files

Copies all the Web application project files to the target location.

All files in the source project folder

Copies all the files in the source project folder to the target location.

Include files from the App_Data folder

Copies all the files in the App_Data folder to the target location. Clearing this check box excludes the App_Data folder from being published regardless of the specified copy option.

Community Additions