Export (0) Print
Expand All

ApplicationManifest.HostInBrowser Property

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

Namespace:  Microsoft.Build.Tasks.Deployment.ManifestUtilities
Assembly:  Microsoft.Build.Tasks.v4.0 (in Microsoft.Build.Tasks.v4.0.dll)

public bool HostInBrowser { get; set; }

Property Value

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

For project types other than WPF Web Browser Applications, you should 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. This tag enables ClickOnce to deploy projects for browser-hosted applications, which contain .xbap files.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5
© 2015 Microsoft