Freigeben über


IVbcHostObject5.SetPlatformWith32BitPreference Method

Sets the /platform value to AnyCPU32BitPreferred.

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

Syntax

'Declaration
Function SetPlatformWith32BitPreference ( _
    platformWith32BitPreference As String _
) As Boolean
bool SetPlatformWith32BitPreference(
    string platformWith32BitPreference
)
bool SetPlatformWith32BitPreference(
    String^ platformWith32BitPreference
)
abstract SetPlatformWith32BitPreference : 
        platformWith32BitPreference:string -> bool
function SetPlatformWith32BitPreference(
    platformWith32BitPreference : String
) : boolean

Parameters

  • platformWith32BitPreference
    Type: System.String

    True to set the /platform value to AnyCPU32BitPreferred; otherwise, False.

Return Value

Type: System.Boolean
Returns True if the method was successful.

Remarks

If the Prefer32Bit property is set on the project, SetPlatformWith32BitPreference changes the /platform value AnyCPU or the default platform value (nulla null reference (Nothing in Visual Basic) or "") to AnyCPU32BitPreferred. For more information, see /platform (Visual Basic).The AnyCPU/platform switch setting (/platform:AnyCPU) runs your application as a 64-bit process whenever possible, falling back to 32-bit for 32-bit-only systems. However, running applications as 32-bit is often preferred to running them as 64-bit because 64-bit applications may consume more memory. The AnyCPU32BitPreferred setting is similar to AnyCPU except that its default action is to run applications in 32-bit mode on systems that support either 32-bit or 64-bit mode. This setting accommodates future processors that may not have a fallback 32-bit mode.

.NET Framework Security

See Also

Reference

IVbcHostObject5 Interface

Microsoft.Build.Tasks.Hosting Namespace