11

I installed the Visual Studio 2017 Build Tools. After installation, there's only an x86 Developer Command Prompt when navigating Start → Programs → Visual Studio 2017 → Visual Studio Tools. There are no prompts for x64 and ARM. (Usually there's about 6 developer prompts to choose from).

Where are the build tools for x64 and ARM located?


UPDATE (JAN-18-2017)

After installing the entire Windows 10 SDK, Build 15003 per @magicandre1981 instructions, I cannot find the Developer Prompts. I can't find them in the Start menu; and dropping into a Git Bash shell and searching for them returns 0 results.

In the names below, vsdevcmd.bat is what was installed by the VC++ Build Tools for 2017. vcbuildtools.bat is what was installed by the VC++ Build Tools for 2015.

MINGW64 /c/Program Files (x86)/Windows Kits/10
$ find . -iname 'vsdevcmd.*'

$ find . -iname 'vcbuildtools.*'

$ find . -iname '*.bat'

$ find . -iname '*.cmd'
./bin/10.0.15003.0/arm/SecureBoot/DeleteKitsPolicy.cmd
./bin/10.0.15003.0/arm/SecureBoot/InstallKitsPolicy.cmd
./bin/10.0.15003.0/arm64/install-sampleprovider.cmd
./bin/10.0.15003.0/arm64/uninstall-sampleprovider.cmd
./bin/10.0.15003.0/x64/install-sampleprovider.cmd
./bin/10.0.15003.0/x64/uninstall-sampleprovider.cmd
./bin/10.0.15003.0/x86/DismFoDInstall.cmd
./bin/10.0.15003.0/x86/GenerateUnionWinMD.cmd
./bin/10.0.15003.0/x86/install-sampleprovider.cmd
./bin/10.0.15003.0/x86/uninstall-sampleprovider.cmd
./bin/arm/SecureBoot/DeleteKitsPolicy.cmd
./bin/arm/SecureBoot/InstallKitsPolicy.cmd
./bin/arm64/install-sampleprovider.cmd
./bin/arm64/uninstall-sampleprovider.cmd
./bin/x64/install-sampleprovider.cmd
./bin/x64/uninstall-sampleprovider.cmd
./bin/x86/DismFoDInstall.cmd
./bin/x86/GenerateUnionWinMD.cmd
./bin/x86/install-sampleprovider.cmd
./bin/x86/uninstall-sampleprovider.cmd
./Debuggers/x64/srcsrv/cv2http.cmd
./Debuggers/x64/srcsrv/cvsindex.cmd
./Debuggers/x64/srcsrv/p4index.cmd
./Debuggers/x64/srcsrv/ssindex.cmd
./Debuggers/x64/srcsrv/svnindex.cmd
./Debuggers/x64/srcsrv/tfsindex.cmd
./Debuggers/x64/srcsrv/vssindex.cmd
./Debuggers/x64/srcsrv/walk.cmd
./Debuggers/x86/srcsrv/cv2http.cmd
./Debuggers/x86/srcsrv/cvsindex.cmd
./Debuggers/x86/srcsrv/p4index.cmd
./Debuggers/x86/srcsrv/ssindex.cmd
./Debuggers/x86/srcsrv/svnindex.cmd
./Debuggers/x86/srcsrv/tfsindex.cmd
./Debuggers/x86/srcsrv/vssindex.cmd
./Debuggers/x86/srcsrv/walk.cmd
./Windows Performance Toolkit/gpuview/log.cmd
./Windows Performance Toolkit/gpuview/log_mem.cmd
./Windows Performance Toolkit/WdfPerfEnhancedVerifier.cmd

$

Out of desperation, I copied the 2017 Build Tools Developer Prompt (for x86), and added the amd64_arm as the 2015 build tools does. It results in a failure:

[ERROR:parse_cmd.bat] Invalid command line argument: 'amd64_arm'. Argument will
be ignored.
**********************************************************************
** Visual Studio 2017 RC Developer Command Prompt v15.0
** Copyright (c) 2016 Microsoft Corporation
**********************************************************************
[ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be inc
omplete and/or incorrect. ***

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools>

More desperation... I started tracing the msiexec installers using process monitor, and examining MSI contents using 7-zip. The best I can tell, there are no developer prompts, even in the Developer Tools MSI installer:

enter image description here

jww
  • 97,681
  • 90
  • 411
  • 885

2 Answers2

14

The developer prompt bat files seem to have been restructured a little in VS 2017. Instead of having a fixed set of predefined developer prompts, you can customize it even more now.

To get a developer prompt for e.g. arm, add -arch=arm -host_arch=amd64 as parameters to VsDevCmd.bat (e.g. in the shortcut in the start menu).

For the full list of available options, have a look in \Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\core\parse_cmd.bat, or call "\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -help.

I'm not sure if this really is documented anywhere, or if it will be fixed up and/or documented better for the final release of VS 2017.

Installing the insider preview Windows 10 SDK is unrelated to this; the standalone Windows SDK doesn't include any compilers, only headers and link libraries.

mstorsjo
  • 12,983
  • 2
  • 39
  • 62
  • 5
    To save time, the `-arch` options are: `x86`, `amd64`, `arm`. – Timmmm May 07 '17 at 10:35
  • Except arm doesn't seem to work: `vsdevcmd -arch=arm` results in `ERROR: Invalid host architecture 'arm'.` even if you have the latest (15063) Windows 10 SDK installed with the ARM tools. – Akeo May 08 '17 at 21:27
  • Did you add `-host_arch=amd64` as well? Otherwise it might think you want to have the same host tools architecture as the target. – mstorsjo May 09 '17 at 06:28
  • @mstorsjo, the problem is that if you try to add `-host_arch=amd64`, then you end-up with the amd64 target. In other words, `cl /?` reports `Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64`, which means it targets x86_64, whereas, when using the VS2015 ARM prompts, the same command reports `Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for ARM`. Furthermore, the lack of a `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\arm\cl.exe` makes it clear that there is __NO__ ARM cross compilation support in VS2017. – Akeo May 12 '17 at 12:08
  • 1
    There sure is ARM cross compilation support in VS2017 (I do have the exact `cl.exe` that you say is missing), but you might not have installed that part - it's not enabled by default. You need to open the "Individual components" tab in the installer and check the "Visual C++ compilers and libraries for ARM" box. See http://pasteboard.co/5uxpd08Yi.png. – mstorsjo May 12 '17 at 19:19
  • Ah, I see you're right! I only ever looked at the right hand side for Workloads, which doesn't list ARM (http://pasteboard.co/6lBmDB14Z.png), and never imagined that Microsoft would be devious enough to only list the ARM compiler and library under "Individual Components". Many, many thanks for pointing that out!! – Akeo May 14 '17 at 23:16
  • @mstorsjo - ARM64 is still broken as of August, 2017. See [Visual Studio 2017 and ARM64 testing](https://groups.google.com/d/msg/cryptopp-users/E_zL5s5Mhd0/XEvbWlzoAgAJ) on the Crypto++ mailing list. – jww Aug 04 '17 at 06:45
  • Yes, because Microsoft haven't yet released the MSVC compiler for ARM64 yet. There is simply no cl.exe that produces code for ARM64 in there. – mstorsjo Aug 04 '17 at 07:02
  • Try run vsdevcmd -? to get the full list. – Alex Budovski Nov 15 '17 at 22:36
  • Just an update, using VS2019 `-arch=arm64 -host_arch=amd64` is finally supported. – tresf Jul 21 '20 at 18:35
1

Install the Windows 10 SDK and WDK (at least Build 16299) to get the ARM Compiler for Desktop Applications.

enter image description here

Open the Project configuration and create ARM(64) configuration:

enter image description here

If you try to compile it you would get an error that ARM64 is not supported for Desktop:

enter image description here

To fix this, unload the project and open it in editor and add the line <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support> to the debug and release entry for ARM64:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v141</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
    <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v141</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
    <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
  </PropertyGroup>

and WindowsSDKDesktopARMSupport for 32Bit ARM.

Save changes, load the project again and now compilation works fine:

enter image description here

The 15.9 Update for VS2017, adds official ARM64 support (only for UWP), here the commandline to open ARM64 dev prompt is:

%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" amd64_arm

32 Bit Arm commandline is:

%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86_arm
magicandre1981
  • 27,895
  • 5
  • 86
  • 127
  • Thanks @magicandre1981. I can't test this for a few hours, but I'll get back. There are two other questions you can make an easy points on based on the ***arm64 apps***: [Detect ARM-64 in preprocessor?](http://stackoverflow.com/q/37244202) and [ARM SHA extensions and “error C3861: vsha1h_u32: identifier not found”](http://stackoverflow.com/q/41646026). If you don't answer, then I will for future visitors. – jww Jan 17 '17 at 19:50
  • Thanks again @magicandre1981. The download is not available for me. Oh well, it was a nice try... – jww Jan 17 '17 at 22:43
  • you can join the insider program without issues. HEre is a DL link for the next 24 hours: https://software-download.microsoft.com/pr/Windows_InsiderPreview_SDK_en-us_15003.iso?t=8e42d9d8-4805-4671-8e25-be1fc6513f37&e=1484803567&h=dd5cdb23f8c1efb26c8897059a777df8 – magicandre1981 Jan 18 '17 at 05:27
  • Thanks @magicandre1981. Still no joy on the Developer Prompts. Microsoft has this so screwed up... For 15 years, we got Developer Tools with Visual Studio and then the Build Tools. Then, in 2017, it is broken. Its absolutely amazing they took a simple process that worked and broke it. Some idiot probably got a big bonus for it. – jww Jan 18 '17 at 07:58
  • ok, I haven't installed the c++ tools because I don't use the VS2017, so I can't see if it really worked :( – magicandre1981 Jan 18 '17 at 16:15
  • ARM64 is still broken as of August, 2017. I can't test and others can't test. Hat's off to Microsoft for f**k'ing it up so badly. See [Visual Studio 2017 and ARM64 testing](https://groups.google.com/d/msg/cryptopp-users/E_zL5s5Mhd0/XEvbWlzoAgAJ) on the Crypto++ mailing list. – jww Aug 04 '17 at 06:51
  • @jww in VS2017 15.4 with 16299 SDK/WDK I can compile for ARM64 – magicandre1981 Nov 07 '17 at 15:59
  • I'm generating an ARM configuration. On the "New Solution Platform" dialog, pressing OK produces error: "The operation could not be completed. Unspecified error". Why is this? – nyanpasu64 Jan 27 '18 at 05:32
  • edit the csproj on your own ** Debug ARM64 ** same for release and add the entry you see in picture – magicandre1981 Jan 27 '18 at 07:08