locked
How do I create an appx store cotainer using msbuild? RRS feed

  • Question

  • I remember with earlier versions of Visual Studio 2015, by default when building a Windows Universal app in msbuild by default would generate an appx, appxupload, and appxsym file.

    I found that this isn't the case with the version of msbuild (14.0.23107.0) and VS 2015 (14.0.23107.0) that I have.

    I run the following msbuild command after create a blank windows universal app from the provided template. I have made zero changes to it. I set BuildAppxUploadPackageForUap to true to try to get an appxupload out.

    msbuild App2.sln /t:App2:Rebuild /p:Configuration=Debug /p:Platform=x86 /p:BuildAppxUploadPackageForUap=true

    I get an error saying:

    (_GenerateAppxUploadPackageRecipeFile target) ->
      C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1901,5): error MSB4044: The "GenerateAppxPackageRecipe" task was not given a value for the required parameter "AppxManifestXml".

    I don't want to do this in visual studio because this needs to be done on a build server. How do I fix this?

    Thursday, August 6, 2015 9:43 PM

All replies

  • We have the same problem that you are having,  trying to figure out the right msbuild options to create a correct appxupload.    We have been successful at getting a appxupload with the following msbuild commands:

    msbuild app.sln /p:configuration="Release" /p:Platform="x64" /target:Clean;Rebuild

    msbuild app.sln /p:AppxBundle=Always /p:AppxPackageIsForStore=true /p:BuildAppxUploadPackageForUap=true /p:configuration="Release" /p:Platform="x86" /target:Clean;Rebuild;Publish


    This is for a C# project that has support for x64 and x86 platforms in it.

    The above msbuild commands do produce a appxupload on the build server but it is not valid,  the x64 appx within the appxupload is .NET native, but the x86 appx is not.  .NET Native is enabled for Release/x64 and Release/x86 in project settings, and this same problem does not happen when making the AppxUpload through Visual Studio.

    I searched through the msbuild .targets file to find another option  /p:UseDotNetNativeToolchain=true which you would think might help force .NET native,  but that doesn't seem to help either.

    Wednesday, August 19, 2015 5:35 PM
  • we are having the same problem. Were you able to solve it?
    Saturday, September 12, 2015 11:23 PM
  • WinTools 1.1 solves this problem

    • Proposed as answer by sh_p11 Friday, October 2, 2015 5:14 PM
    Friday, October 2, 2015 5:14 PM