Share via


BuildParameters.SaveOperatingEnvironment Property

Gets or sets a switch specifying if the operating environment, such as the current directory and environment, should be saved and restored between project builds and task invocations.

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.Execution
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

Syntax

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

Property Value

Type: System.Boolean
Returns a switch indicating whether the operating environment should be saved and restored between project builds and task invocations; true if the environment should be saved, false otherwise.

Remarks

This should be set to false for any other build managers running in the system so that we do not have two build managers trampling on each others environment.

.NET Framework Security

See Also

Reference

BuildParameters Class

Microsoft.Build.Execution Namespace