Udostępnij za pośrednictwem


Package/Publish Web Tab, Project Properties

The Package/Publish Web tab on the web application project Properties page lets you specify settings that are used when you deploy the project. This topic applies to the following products:

Some of the settings that you can specify in the Package/Publish Web tab can also be specified in a publish profile. If any settings are specified both in a publish profile and on the Package/Publish Web tab, the publish profile setting takes precedence. (The Include all databases configured in Package/Publish SQL tab is an exception to this rule.)

For information about how to configure publish profiles, see How to: Deploy a Web Application Project Using One-Click Publish in Visual Studio. For more information about how to deploy a web application project by using Visual Studio, see Web Application Project Deployment Overview for Visual Studio and ASP.NET.

To access this tab on the Properties page

  1. In Visual Studio, open a web application project.

  2. In Solution Explorer, open the shortcut menu and choose Properties (C#) or MyProject (Visual Basic) to display the Properties page.

  3. Choose the Package/Publish Web tab.

    Package/Publish dialog box

UI Elements

  • Configuration
    Specifies the build configuration that the settings on this tab apply to. For example, you can specify package settings for a debug release (Debug build configuration) that are different from the settings for a production release (Release build configuration). When you select a build configuration, the settings that you specify are stored with that configuration type. You can also specify that settings apply to All Configurations

  • Platform
    Specifies the platform that the settings apply to.

  • Items to deploy (applies to all deployment methods)
    Specifies settings that apply no matter which publish method you choose. (You specify a publish method in the publish profile.)

    The drop-down list includes the following options:

    • Only files needed to run this application

      Files that are not required in order to run the site, such as source code files that are compiled into assemblies, are not deployed to the destination server.

    • All files in this project

      All files included in the project are deployed to the destination server. Files that are in the project folder but are not included in the project are excluded.

    • All files in this project folder

      All files in the project folder are deployed to the destination server, even if they are excluded from the project.

    For more information about how Visual Studio determines which files to deploy, see Why don't all of the files in my project folder get deployed? in Web Application Project Deployment FAQ for Visual Studio and ASP.NET.

  • Exclude generated debug symbols
    Specifies whether generated debug symbols (.pdb files) should be deployed to the destination server.

    Debug symbols files are typically generated when you build a web application using a debug configuration. Typically you would not deploy debug symbols to a production server.

  • Exclude files from the App_Data folder
    Specifies whether the files in the App_Data folder should be deployed to the destination server.

    The App_Data folder typically contains test databases during the development cycle. The contents of this folder might not be appropriate for a production environment.

  • Precompile this application before publishing
    Specifies whether Visual Studio should precompile or merge assemblies when you package or publish the project. By default, you get the following compile and merge behavior:

    • IIS metabase path is not used for source input.

      You might need to use an IIS metabase path if your web site contains one or more sub-web sites. During compilation, the compiler processes all of the files in a directory tree. If there are sub-web sites, this will result in build errors. To avoid these errors, you can specify the IIS metabase path of the web site you are compiling, which causes the ASP.NET compiler to skip any sub-web sites defined in the IIS metabase.

    • Precompiled assemblies will not be updateable.

      By default,.aspx and .ascx files are compiled and the HTML markup for pages and controls is removed and compiled into the assembly output. Compiling these files is typically the only reason you would precompile a web application project, but you might have selected the Precompile this application before publishing check box only so that you can choose a merge option.

    • Each source file generates a separate assembly.

    If you want to change any of these default settings, click the Advanced button. For more information see, Advanced Precompile Settings Dialog Box.

  • Items to deploy (applies to Web Deployment Tool only)
    Specifies settings that apply if you select the Web Deploy deployment method. (You specify a deployment method in the publish profile.) These settings also apply when you create deployment packages.

  • Include all databases configured in Package/Publish SQL tab
    Specifies whether Visual Studio will deploy databases as well as files. Although the check box label only mentions the Package/Publish SQL tab, clearing this check box also disables database deployment that is configured in the Publish Web wizard.

  • Include all IIS settings as configured in IIS Manager (used only for IIS Web projects)
    Specifies that the IIS settings from the source computer (the open IIS Web project) should be propagated to the destination computer. This option is disabled if the project does not use IIS or IIS Express, and the option will only work with the Web Deploy publish method.

    Inherited IIS settings are not propagated to the destination server. For example, suppose that the IIS Web application that you want to deploy is under the default Web site on the source server, and the default Web site has Windows authentication set to true. If you deploy this site to the default Web site on a server that has Windows authentication set to false for the default Web site, Windows authentication will be false for the deployed Web site even if you select the Include all IIS settings as configured in IIS Manager check box.

  • Include application pool settings used by this Web project
    Specifies whether application pool settings from the source server (the current IIS Web project) should be propagated to the destination server.

  • Create deployment package as a .zip file
    Specifies that the deployment package should be created in the form of a compressed (.zip) file. If this option is not selected, a deployment package is created as files in folders. This setting has no effect on packages that are created from Visual Studio in the Publish Web wizard. When you use the Publish Web wizard, deployment packages are always created as .zip files.

  • Location where the package will be created
    Specifies where to create the deployment package when the package is created by using Visual Studio. When you use the Publish Web wizard, this value is ignored and the package location specified in the publish profile is used.

  • IIS Web site/application name to be used on the destination server
    Specifies the name of the Web site and application in IIS Manager on the destination server.

    Uwaga

    The default value ("Default Web Site") for the Web site will not work correctly if your operating system uses IIS 6 (Windows Server 2003) and is a language version other than English. In that case you must enter a value for the Web site.

  • Physical path of Web application on destination server (used only when IIS settings are included)
    Specifies where to copy the Web package files on the destination server.

  • Password used to encrypt secure IIS settings
    Specifies an encryption key to use when the deployment process encrypts secure IIS settings.

    Security noteSecurity Note

    This password is stored in plain text in the deployment package .cmd file.

See Also

Concepts

Web Deployment Content Map for Visual Studio and ASP.NET