Share via


<entryPoint> Element (ClickOnce Application)

Identifies the assembly that should be executed when this ClickOnce application is run on a client computer.

<entryPoint 
   name 
   dependencyName 
> 
   <assemblyIdentity 
      name 
      version 
      processorArchitecture 
      language 
   /> 
   <commandLine 
      file 
      parameters
   />
   <customHostRequired />
   <customUX />
</entryPoint>

Elements and Attributes

The entryPoint element is required and is in the asm.v2 namespace. There may only be one entryPoint element defined in an application manifest.

The entryPoint element has the following attributes.

Attribute

Description

name

Required. Identifies the main or function entry point.

dependencyName

Required. The dependent assembly for the entry point.

entryPoint has the following elements.

assemblyIdentity

Required. The role of assemblyIdentity and its attributes is defined in <assemblyIdentity> Element (ClickOnce Application).

The processorArchitecture attribute of this element and the processorArchitecture attribute defined in the assemblyIdentity elsewhere in the application manifest must match.

commandLine

Required. Must be a child of the entryPoint element. It has no child elements and has the following attributes.

Attribute

Description

File

Required. A local reference to the startup assembly for the ClickOnce application.

Parameters

Required. Describes the action to take with the entry point. The only valid value is run; if a blank string is supplied, run is assumed.

customHostRequired

Optional. If included, specifies that this deployment contains a component that will be deployed inside of a custom host, and is not a stand-alone application.

If this element is present, the assemblyIdentity and commandLine elements must not also be present. If they are, ClickOnce will raise a validation error during installation.

This element has no attributes and no children.

customUX

Optional. The role of the customUX element is defined in <customUX> Element (ClickOnce Application).

Remarks

This element identifies the assembly and entry point for the ClickOnce application.

You cannot use commandLine to pass parameters into your application at run time. You can access query string parameters for a ClickOnce deployment from the application's AppDomain. For more information, see How to: Retrieve Query String Information in a ClickOnce Application.

Example

The following code example illustrates entryPoint elements in an application manifest for a ClickOnce application. This code example is part of a larger example provided for the ClickOnce Application Manifest topic.

<!-- Identify the main code entrypoint. -->
<!-- This code runs the main method in an executable assembly. -->
<entryPoint>
   <commandLine file="Notepad.exe" parameters="run" />
</entryPoint>

See Also

Reference

ClickOnce Application Manifest

Change History

Date

History

Reason

July 2008

Added information about customUX.

SP1 feature change.