ICscHostObject4.SetPlatformWith32BitPreference(String) Method

Definition

Sets the /platform value to AnyCPU32BitPreferred.

public:
 bool SetPlatformWith32BitPreference(System::String ^ platformWith32BitPreference);
public bool SetPlatformWith32BitPreference (string platformWith32BitPreference);
abstract member SetPlatformWith32BitPreference : string -> bool
Public Function SetPlatformWith32BitPreference (platformWith32BitPreference As String) As Boolean

Parameters

platformWith32BitPreference
String

true to set the /platform value to AnyCPU32BitPreferred; otherwise, false.

Returns

true if the method was successful.

Remarks

If the Prefer32Bit property is set on the project, SetPlatformWith32BitPreference changes the /platform value from AnyCPU or the default value (null or "") to AnyCPU32BitPreferred. For more information, see /platform (C# Compiler Options).

If the /platform value is set to AnyCPU (/platform:AnyCPU), your application runs as a 64-bit process whenever possible and falls back to 32-bit for 32-bit-only systems. However, you might prefer an application to run as a 32-bit process 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 mode. This setting accommodates future processors that may not fall back to 32-bit mode.

Applies to