Can ARM desktop programs be built using visual studio 2012?

I was working with visual studio 2012 beta and my desktop (win32) program compiled fine in ARM architecture.

After upgrading to visual studio 2012 RC, the compiler would not work and spews out the following error:

"Compiling Desktop applications for the ARM platform is not supported"

I found a forum post on this http://connect.microsoft.com/VisualStudio/feedback/details/745580/arm-configuration-doesnt-work

Is it correct that Microsoft is really cutting off win32 development on ARM? And that compiling in VS2012 beta was just a fluke?


Solution 1:

You can edit the file:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\ARM\Microsoft.Cpp.ARM.Common.props

In the <PropertyGroup> section add the line:

<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>

before </PropertyGroup>

And that's all, you can build ARM desktop apps with VS2012.

Solution 2:

I was able to get around that error and compile a little "hello world" cpp file for ARM by adding the "/D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE" command-line argument to the ARM version of cl at C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm. I found that #define from sn0w's answer on this question in the crtdefs.h file, without having to modify that file. Now, I can't guarantee that anything more complex will actually work, or that Microsoft hasn't instituted some sort of whitelisting or digital signature verification for Windows RT desktop apps, so even though it may compile, it may not be allowed to run when Windows RT is finally available.

Note that before you can run the ARM version of cl.exe from the command line, you must set the environment variables using this batch file: "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat"

Solution 3:

Even if you compile the app, you won't be able to run it on Windows 8 RT as unsigned apps will not start.

I just tested this, and unfortunately it is the case.

You receive the following message:
Windows cannot verify the digital signature of this file

I imagine there is probably a work around for this, but it will never be officially supported.