locked
Building, Deploying and Certify Metro Style App From Command Line

    Question

  • I am working on a batch file that will, build my visual studio solution, then deploy my metro style application to my computer so that when I run the AppCert.exe it will be able to find my metro app so it can certify it. I have the Build part down correctly and the Certify part down, but I am having trouble finding the information on how to install my metro app via command line so that when I run the AppCert.exe it will be able to find my package. My problem is when the AppCert.exe runs it cannot find the package because it was never deployed to my machine, is there a way to certify the package without installing it to my machine? I can see that it is possible to run the app certification on an app that has not been deployed through the solution -> store -> create app package option, so I would believe that it should be possible to do it via through command line.

    My batch file so far:

    call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
    cd C:\Program Files (x86)\Windows Kits\8.0\App Certification Kit\
    msbuild "C:\<my documents path>\Visual Studio 2012\Projects\WinRT\Development\C#\metroapp\metorapp.sln" /p:Configuration=Release /p:Platform=x86 /p:OutDir=c:\builds\droplocation\

    appcert.exe reset
    appcert.exe test -apptype metrostyle -packagefullname msbuild_1.0.0.0_x86 -reportoutputpath "C:\Builds\Report\ValidationResult.xml"
    PAUSE


    .Chris

    Tuesday, June 26, 2012 5:40 PM

Answers

  • I figured out the issue after a full day of searching on how to use appcert.exe. The solution was found by using a parameter called -AppxPackagePath which doesn't seem to be documented anywhere on msdn that I could find. Here is my finished batch script which I will probably have to modify to account for version numbers changing.

    Note: This my application is only building for x86 and my solution is configured to build x86 in release mode as well. I haven't tried building and certifying x64, but I hope this helps anyone who is trying to automate their build and cert process.

    call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
    msbuild "C:\Users\<Me>\Documents\Visual Studio 2012\Projects\WinRT\Development\C#\metorapp\metorapp.sln" /p:Configuration=Release /p:Platform=x86 /p:OutDir=c:\builds\droplocation\
    DEL "C:\Builds\Report\ValidationResult.xml"
    "C:\Program Files (x86)\Windows Kits\8.0\App Certification Kit\appcert.exe" reset
    "C:\Program Files (x86)\Windows Kits\8.0\App Certification Kit\appcert.exe" test -apptype metrostyle -AppxPackagePath "C:\Builds\DropLocation\msbuild\AppPackages\metorapp_1.0.0.2_x86_Test\metorapp_1.0.0.2_x86.appx" -reportoutputpath "C:\Builds\Report\ValidationResult.xml"
    PAUSE


    .Chris

    • Marked as answer by chrisahill1 Wednesday, June 27, 2012 12:33 AM
    Wednesday, June 27, 2012 12:33 AM

All replies

  • Hi chrisahill1,

    Have you looked over the following thread?  It also looks as though this question might be best answered in the forum I have moved it into.

    Thanks,

    Tuesday, June 26, 2012 11:18 PM
  • the thread you linked is not related to what I'm doing. I'm trying to create a batch file that will build and then run the app certification kit against my windows 8 metro app. this is the output I get when I run my batch file.

    The filename, directory name, or volume label syntax is incorrect.

    For more information, please run APPCERT.EXE /?

    Successfully reset the testing configuration.

    For more information, please run APPCERT.EXE /?


    Beginning execution of phase PROLOG (1 of 3).
        Beginning execution of task ManageAppXDeployment (1 of 4).
        Task execution result was success.
        Beginning execution of task ProgramInventory (2 of 4).
        Task execution result was success.
        Beginning execution of task ModifyFaultTolerantHeap (3 of 4).
        Task execution result was success.
        Beginning execution of task WindowsErrorReporting (4 of 4).
        Task execution result was success.
    Execution of phase is complete.
    Successfully executed the PROLOG phase.


    The Windows App Certification Kit cannot continue testing since the specified Metro style App was not found. Please verify that the packagefullname is correct.


    .Chris

    Tuesday, June 26, 2012 11:55 PM
  • I figured out the issue after a full day of searching on how to use appcert.exe. The solution was found by using a parameter called -AppxPackagePath which doesn't seem to be documented anywhere on msdn that I could find. Here is my finished batch script which I will probably have to modify to account for version numbers changing.

    Note: This my application is only building for x86 and my solution is configured to build x86 in release mode as well. I haven't tried building and certifying x64, but I hope this helps anyone who is trying to automate their build and cert process.

    call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
    msbuild "C:\Users\<Me>\Documents\Visual Studio 2012\Projects\WinRT\Development\C#\metorapp\metorapp.sln" /p:Configuration=Release /p:Platform=x86 /p:OutDir=c:\builds\droplocation\
    DEL "C:\Builds\Report\ValidationResult.xml"
    "C:\Program Files (x86)\Windows Kits\8.0\App Certification Kit\appcert.exe" reset
    "C:\Program Files (x86)\Windows Kits\8.0\App Certification Kit\appcert.exe" test -apptype metrostyle -AppxPackagePath "C:\Builds\DropLocation\msbuild\AppPackages\metorapp_1.0.0.2_x86_Test\metorapp_1.0.0.2_x86.appx" -reportoutputpath "C:\Builds\Report\ValidationResult.xml"
    PAUSE


    .Chris

    • Marked as answer by chrisahill1 Wednesday, June 27, 2012 12:33 AM
    Wednesday, June 27, 2012 12:33 AM