0

I have a VCXPROJ file from Visual Studio 2010. The file has had Win32 and x64 support for years, dating back to the VC++ 5.0 days. We are trying to add ARM support to it.

We opened the file under a text editor and added the following elements. First, we added ProjectConfiguration with Debug|ARM and Release|ARM.

<ItemGroup Label="ProjectConfigurations">
  <ProjectConfiguration Include="Debug|Win32">
    <Configuration>Debug</Configuration>
    <Platform>Win32</Platform>
  </ProjectConfiguration>
  ...
  <ProjectConfiguration Include="Debug|ARM">
    <Configuration>Debug</Configuration>
    <Platform>ARM</Platform>
  </ProjectConfiguration>
  <ProjectConfiguration Include="Release|ARM">
    <Configuration>Release</Configuration>
    <Platform>ARM</Platform>
  </ProjectConfiguration>
</ItemGroup>

Second, we added a PropertyGroup for ARM and guarded the Globals configurations:

<PropertyGroup Label="Globals" Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">
  <ProjectGuid>{c39f4b46-6e89-4074-902e-ca57073044d2}</ProjectGuid>
  <RootNamespace>cryptlib</RootNamespace>
  <PlatformToolset>v100</PlatformToolset>
  <ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>

<PropertyGroup Label="Globals" Condition="'$(Platform)'=='ARM'">
  <ProjectGuid>{c39f4b46-6e89-4074-902e-ca57073044d2}</ProjectGuid>
  <RootNamespace>cryptlib</RootNamespace>
  <PlatformToolset>v110_wp80</PlatformToolset>
  <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
  <ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>

When we open the project under Visual Studio 2012 or 2013, we see the project toolsets are changed after upgrade/retargeting:

Upgrading project 'cryptlib'...
    Configuration 'DLL-Import Debug|x64': changing Platform Toolset to 'v120' (was 'v100').
    Configuration 'DLL-Import Debug|Win32': changing Platform Toolset to 'v120' (was 'v100').
    Configuration 'DLL-Import Release|x64': changing Platform Toolset to 'v120' (was 'v100').
    Configuration 'DLL-Import Release|Win32': changing Platform Toolset to 'v120' (was 'v100').
    Configuration 'Debug|Win32': changing Platform Toolset to 'v120' (was 'v100').
    Configuration 'Debug|ARM': changing Platform Toolset to 'v120' (was 'v110_wp80').
    Configuration 'Debug|x64': changing Platform Toolset to 'v120' (was 'v100').
    Configuration 'Release|Win32': changing Platform Toolset to 'v120' (was 'v100').
    Configuration 'Release|ARM': changing Platform Toolset to 'v120' (was 'v110_wp80').
    Configuration 'Release|x64': changing Platform Toolset to 'v120' (was 'v100').
Retargeting End: 1 completed, 0 failed, 0 skipped

However, Configuration Manager is missing the ARM configuration:

enter image description here

My first question is, why is Configuration Manager missing the ARM configuration? What do we need to do so Configuration Manager makes the choice available?


Continuing the experiment in ARM support... When I drop into a Visual Studio ARM Developer Prompt and then try to build it after upgrade/retargeting:

C:\Users\Test>msbuild /t:build /p:Configuration=Debug;Platform=ARM cryptlib.vcxp
roj
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/15/2016 7:52:13 PM.
Project "C:\Users\Test\cryptlib.vcxproj" on node 1 (build target(s)).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\ARM\PlatformToo
lsets\v120\Toolset.targets(36,5): error MSB8022: Compiling Desktop applications 
for the ARM platform is not supported. [C:\Users\Test\cryptlib.vcxproj]
Done Building Project "C:\Users\Test\cryptlib.vcxproj" (build target(s)) -- FAIL
ED.

Build FAILED.

"C:\Users\Test\cryptlib.vcxproj" (build target) (1)
->
  (_WindowsSDKDesktopARMSupportInstalled target) ->
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\ARM\PlatformT
oolsets\v120\Toolset.targets(36,5): error MSB8022: Compiling Desktop application
s for the ARM platform is not supported. [C:\Users\Test\cryptlib.vcxproj]

    0 Warning(s)
    1 Error(s)

What's not readily apparent is, Visual Studio changed the platform toolset from v110_wp8 and it used to work. Once Visual Studio changed it to v120 it no longer worked.

My second question is, what is going on with Visual Studio? Why is it taking a "good" configuration and turning it into a "bad" one?

1
  • 1) If you open the project in the VS2012 without upgrading does it show the ARM configurations? 2) Would be helpful to see what the project looks like after upgrade. Maybe the automatic upgrade path from v110_wp80 to v120_wp81 or whatever comes next isn't supported/doesn't work or maybe VS doesn't play well with a conditional globals propertygroup. Since you're repeating more than half of it anyway, you could try to have it unconditionally and override only needed properties based on platform instead.
    – stijn
    Oct 16, 2016 at 8:17

1 Answer 1

1

My first question is, why is Configuration Manager missing the ARM

configuration? What do we need to do so Configuration Manager makes the choice available?

We could use Configuration Manager to add arm platform (Configuration Manager-> from the Active solution platform list -> Add -> select Arm->OK).

My second question is, what is going on with Visual Studio? Why is it taking a "good" configuration and turning it into a "bad" one?

I create a demo and reproduce your issue on my side, it seems that vs2012 (same with vs2013 and vs2015), does not support arm platform by default, you can edit the file to open the function (need administrator permissions):

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>

Best regards,

Cole Wu

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.