Condividi tramite


GenerateBootstrapper.ApplicationRequiresElevation Property

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

Gets or sets whether a component runs with elevated permissions when it is installed on a target computer.

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 ApplicationRequiresElevation As Boolean
public bool ApplicationRequiresElevation { get; set; }
public:
property bool ApplicationRequiresElevation {
    bool get ();
    void set (bool value);
}
member ApplicationRequiresElevation : bool with get, set
function get ApplicationRequiresElevation () : boolean 
function set ApplicationRequiresElevation (value : boolean)

Property Value

Type: System.Boolean
Returns True if the installed component runs with elevated permissions; otherwise False.

Remarks

This property can be set in the project file, but it is not exposed in the MSBuild schema. In the project file's MsiBootstrapper section, set the RequiresElevation Property to True.

A component runs with elevated permissions when it writes a registry key or is being installed to the GAC. For example, if you are installing assemblies to the GAC, you need to set this property to True.

.NET Framework Security

See Also

Reference

GenerateBootstrapper Class

Microsoft.Build.Tasks Namespace

Other Resources

RequiresElevation Property