locked
How Metro style app built for any cpu using a c++ component pass app cert kit test?

    Question

  • Hello,

    We have a metro style app implemented in c#, which is dependent on a c++ winrt component.

    We want to support all platforms so we build our app into "any cpu". But the c++ component cannot be built into "any cpu". So we build c++ component into multiple dlls for each platform we want to support. We have the c# app loads the correct version of dlls at runtime.

    It works but it failed the app cert kit test due to a missing VCLibs package error. 

    The only solution we've found so far require a lot of manual tweaking of the created package:  We add <Dependencies> to VCLibs in package.manifest. After creating the package, we manually add the "Dependencies" folder and copy the versions of VCLibs for all platforms to the package folder.

    It works and past the app cert kit test.

    But we are wondering whether this is the right solution, especially given it requires manual action on the package. If this is not, how can we make sure our app supports all platforms. Do we need to build multiple versions of our app for all supported platforms? If so, how can we upload all these versions into the store and make sure the user gets the correct version?

    Thank you,

    Monday, August 20, 2012 11:32 PM

Answers

  • You are doing a lot of work where VS can do this for you.  I wouldn't recommend you putting logic into your app that is architecture lookup code.  When you use VS to create your package it will give you the option to create multiple per architecture configuration.  Doing this there will create the correct entries in the manifest, etc.  Your managed app taking a dependency on a native component should also add a reference to the C++ runtime (via add reference) to ensure that Dependency node is created for you.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Proposed as answer by Jesse Jiang Wednesday, August 22, 2012 6:33 AM
    • Marked as answer by Jesse Jiang Monday, September 10, 2012 6:45 AM
    Tuesday, August 21, 2012 6:06 AM