GenerateApplicationManifest.HostInBrowser Property
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Gets or sets whether the application is hosted in a browser (as are WPF Web Browser Applications).
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
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 only applies to WPF Web Browser Applications.
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.
See Also
Reference
GenerateApplicationManifest Class
Microsoft.Build.Tasks Namespace