When you publish the application in the above procedures, the following properties are inserted into your project file by the Publish Wizard. These properties directly influence how the ClickOnce application is produced.
In CmdLineDemo.vbproj / CmdLineDemo.csproj:
<AssemblyOriginatorKeyFile>WindowsApplication3.snk</AssemblyOriginatorKeyFile>
<GenerateManifests>true</GenerateManifests>
<TargetZone>LocalIntranet</TargetZone>
<PublisherName>Microsoft</PublisherName>
<ProductName>CmdLineDemo</ProductName>
<PublishUrl>http://localhost/CmdLineDemo</PublishUrl>
<Install>true</Install>
<ApplicationVersion>1.0.0.*</ApplicationVersion>
<ApplicationRevision>1</ApplicationRevision>
<UpdateEnabled>true</UpdateEnabled>
<UpdateRequired>false</UpdateRequired>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdateUrlEnabled>false</UpdateUrlEnabled>
<IsWebBootstrapper>true</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled>
You can override any of these properties at the command line without altering the project file itself. For example, the following will build the ClickOnce application deployment without the bootstrapper:
msbuild /target:publish /property:BootstrapperEnabled=false
Publishing properties are controlled in Visual Studio from the Publish, Security, and Signing property pages of the Project Designer. Below is a description of the publishing properties, along with an indication of how each is set in the various property pages of the application designer:
The following properties are set on the Security page:
Enable ClickOnce Security Settings determines whether ClickOnce manifests are generated. When a project is initially created, ClickOnce manifest generation is off by default. The wizard will automatically turn this flag on when you publish for the first time.
TargetZone determines the level of trust to be emitted into your ClickOnce application manifest. Possible values are "Internet", "LocalIntranet", and "Custom". Internet and LocalIntranet will cause a default permission set to be emitted into your ClickOnce application manifest. LocalIntranet is the default, and it basically means full trust. Custom specifies that only the permissions explicitly specified in the base app.manifest file are to be emitted into the ClickOnce application manifest. The app.manifest file is a partial manifest file that contains just the trust information definitions. It is a hidden file, automatically added to your project when you configure permissions on the Security page.
The following properties are set on the Publish page:
PublishUrl is the location where the application will be published to in the IDE. It is inserted into the ClickOnce application manifest if neither the InstallUrl or UpdateUrl property is specified.
ApplicationVersion specifies the version of the ClickOnce application. This is a four-digit version number. If the last digit is a "*", then the ApplicationRevision is substituted for the value inserted into the manifest at build time.
ApplicationRevision specifies the revision. This is an integer which increments each time you publish in the IDE. Notice that it is not automatically incremented for builds performed at the command-line.
Install determines whether the application is an installed application or a run-from-Web application.
InstallUrl (not shown) is the location where users will install the application from. If specified, this value is burned into the setup.exe bootstrapper if the IsWebBootstrapper property is enabled. It is also inserted into the application manifest if the UpdateUrl is not specified.
SupportUrl (not shown) is the location linked in the Add/Remove Programs dialog box for an installed application.
The following properties are set in the Application Updates dialog box, accessed from the Publish page.
UpdateEnabled indicates whether the application should check for updates.
UpdateMode specifies either Foreground updates or Background updates.
UpdateInterval specifies how frequently the application should check for updates.
UpdateIntervalUnits specifies whether the UpdateInterval value is in units of hours, days, or weeks.
UpdateUrl (not shown) is the location from which the application will receive updates. If specified, this value is inserted into the application manifest.
The following properties are set in the Publish Options dialog box, accessed from the Publish page.
PublisherName specifies the name of the publisher displayed in the prompt shown when installing or running the application. In the case of an installed application, it is also used to specify the folder name on the Start menu.
ProductName specifies the name of the product displayed in the prompt shown when installing or running the application. In the case of an installed application, it is also used to specify the shortcut name on the Start menu.
The following properties are set in the Prerequisites dialog box, accessed from the Publish page.
BootstrapperEnabled determines whether to generate the setup.exe bootstrapper.
IsWebBootstrapper determines whether the setup.exe bootstrapper works over the Web or in disk-based mode.