locked
RTM Known Issue: Supported API test in WACK fails to certify a C++ UWP which references a C# UWP Windows Runtime component RRS feed

  • Question

  • Consider the following scenario. You have developed:

    1.) A Universal Windows Runtime component in C#

    2.) A Universal Windows app in C++ which tries to reference this C# component

    3.) You build the APPX for the platform you are interested (x86, x64 or ARM) and then run WACK (Windows App Cert Kit) against the APPX package - specifically the "Supported API test".

    4.) You expect that the APPX passes the app certification, but the observed result is that the app certification fails with an error which looks similar to this:


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Friday, August 14, 2015 7:14 PM
    Moderator

Answers

  • To workaround this issue, please use the below steps:

    1.) Close your existing solution from Visual Studio (especially the C++ UWP Project)

    2.) Open the .vcxproj file in your favorite text editor

    3.) Locate the Release section for each platform you are trying to build (x86, x64 and/or ARM)

    4.) Add the following section:

    <Optimize>true</Optimize>

    5.) Save and close the .vcxproj file.

    6.) Open the Solution in Visual Studio again, create APPX package for the platform you are interested in and run WACK against the Release configuration you added the above section for.

    7.) This should solve the problem.

    As an example, here's how the section looks like for all the Build configurations (notice <Optimize> under each Build platform).

      ...
      ...<other section of the project>
    
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
        <ConfigurationType>Application</ConfigurationType>
        <UseDebugLibraries>false</UseDebugLibraries>
        <WholeProgramOptimization>true</WholeProgramOptimization>
        <PlatformToolset>v140</PlatformToolset>
        <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
        <Optimize>true</Optimize>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
        <ConfigurationType>Application</ConfigurationType>
        <UseDebugLibraries>false</UseDebugLibraries>
        <WholeProgramOptimization>true</WholeProgramOptimization>
        <PlatformToolset>v140</PlatformToolset>
        <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
        <Optimize>true</Optimize>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
        <ConfigurationType>Application</ConfigurationType>
        <UseDebugLibraries>false</UseDebugLibraries>
        <WholeProgramOptimization>true</WholeProgramOptimization>
        <PlatformToolset>v140</PlatformToolset>
        <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
        <Optimize>true</Optimize>
      </PropertyGroup>
    
      ...
      ...<other section of the project>


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Friday, August 14, 2015 7:15 PM
    Moderator