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:
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?