'Visual Studio: x86/x64 Properties Macro
I'm looking for a Visual Studio Build Configuration Macro of the form 'x86' or 'x64'. I am aware of $(Platform) but, this seems to give me 'Win32' or 'x64'.
Does anyone know of a macro that will give 'x86' instead of 'Win32'? I'm interested in Visual Studio 2015 in particular.
Solution 1:[1]
The $(PlatformShortName) macro evaluates to the value you are expecting for those platforms.
| Platform | $(Platform) |
$(PlatformShortName) |
|---|---|---|
| Win32 | Win32 |
x86 |
| x64 | x64 |
x64 |
This is also briefly documented on Microsoft Docs under Common macros for build commands and properties.
You can also check its value for other platforms by using the "Macros" tab when editing a property. This will display the evaluated values for different macros under the current configuration:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | terrehbyte |

