Udostępnij za pośrednictwem


GenerateApplicationManifest.HostInBrowser Property

Definition

Gets or sets whether the application is hosted in a browser (as are WPF Web Browser Applications).

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 property bool HostInBrowser { bool get(); void set(bool value); };
public bool HostInBrowser { get; set; }
public bool HostInBrowser { [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
member this.HostInBrowser : bool with get, set
[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.HostInBrowser : bool with get, set
Public Property HostInBrowser As Boolean

Property Value

A Boolean value that indicates whether the application being deployed will be hosted in a browser (true), or not (false). true only applies to WPF Web Browser Applications.

Attributes

Remarks

For project types other than WPF Web Browser Applications, set HostInBrowser to false (the default value).

When you deploy a WPF Web Browser Application, you must set the HostInBrowser property to true. This causes the <hostInBrowser> tag to be added to the generated application manifest, enabling ClickOnce to deploy projects for browser-hosted applications, which contain .xbap files.

You also have to make the application available online only by setting Install to false. If this condition is not met, you will receive MSBuild Error MSB3116.

Applies to

See also