다음을 통해 공유


ApplicationManifest.HostInBrowser Property

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

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

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

Syntax

'Declaration
Public Property HostInBrowser As Boolean
public bool HostInBrowser { get; set; }
public:
property bool HostInBrowser {
    bool get ();
    void set (bool value);
}
member HostInBrowser : bool with get, set
function get HostInBrowser () : boolean 
function set HostInBrowser (value : boolean)

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.

Remarks

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 Security

See Also

Reference

ApplicationManifest Class

Microsoft.Build.Tasks.Deployment.ManifestUtilities Namespace

Install

Other Resources

MSBuild Error MSB3116