locked
Post-Build Steps: Copy Manifest RRS feed

  • Question

  • I had the crazy idea that I could copy my manifest in a post-build step in Visual Studio 2012 and Windows 8. The funny thing is the following actually copies the file, but Visual Studio reports an error anyway:

    xcopy "$(ProjectDir)Package.appxmanifest" "$(OutDir)AppxManifest.xml" /Y

    The command "xcopy [path]Package.appxmanifest "..\bin\x86\Debug\AppxManifest.xml" /Y exited with code 4.

    Since the copy actually worked, why am I getting this error?

    The next step was going to be running MakeAppx if anyone's been down that road...


    Randy

    Monday, October 21, 2013 9:36 PM

Answers

All replies

  • Can you explain what you are trying to achieve by this?

    The appxmanifest will be copied by default. The error message is probably accurate that the post-build xcopy failed, but the file is there from the normal build process.

    --Rob

    Tuesday, October 22, 2013 1:34 AM
    Moderator
  • Thanks for the response. The following link describes copy/rename the manifest file to the top-level output directory. It then says to run MakeAppx to generate a package that can be side-loaded on a separate tablet (or any other) Windows 8 RT device. My goal in the question above was to just sort out the copy/rename.

    App packager (MakeAppx.exe) (on msdn)

    http://msdn.microsoft.com/en-us/library/hh446767(VS.85).aspx#create_package_using_dir

     xcopy "$(ProjectDir)Package.appxmanifest" "$(OutDir)AppxManifest.xml" /Y/E/D1;

    I just deleted my entire bin directory tree and tried again, and now the error is that I'm exiting with code 1. I also added the following line, and the error from that is  "You must specify an output package path (/p)

    MakeAppx pack /d "$(OutDir)"  /p  "$(OutDir)"


    Randy

    Tuesday, October 22, 2013 12:12 PM
  • The article you're following is for building the appxpackage outside of Visual Studio. If you're building within Visual Studio then you shouldn't explicitly call makeappx, etc.

    --Rob

    Tuesday, October 22, 2013 11:16 PM
    Moderator
  • Let me say what I'm doing and try asking my question again:

    I'm developing a Windows 8 Store App on a laptop. The user will use the app on a tablet. I need to demo on the tablet, which has no development tools.

    On the laptop, I click Simulator in Visual Studio and the app runs. Exactly what I expected.

    I also expected that Visual Studio would create the package for me, and all I'd have to do is copy the package file to the tablet and side-load it. As far as I can tell, Visual Studio 20212 does NOT create the package file. If it does, please tell me where to find it?

    If not, please tell me what I need to do to create the package file that can be copied to the tablet and side-loaded. The attempt above was to automate the creation of the package file. Typing at the Visual Studio command prompt is too slow to do more than once or twice.

    Thanks...


    Randy

    Wednesday, October 23, 2013 11:58 AM
  • There is a Create App Packages wizard. It's in different places by default in different versions, but look for a "Store" menu either at top level or under "Project" (I think. I dont have it handy to check)

    See http://msdn.microsoft.com/en-us/library/windows/apps/hh975357.aspx and http://msdn.microsoft.com/en-us/library/windows/apps/hh975356.aspx for more detail. The steps are essentially the same in 2012 as in 2013.

    Create a local package and you can copy and install it for testing on your test system.

    --Rob


    Wednesday, October 23, 2013 2:17 PM
    Moderator