问题描述
我记得早期版本的Visual Studio 2015,默认情况下,默认情况下在msbuild中构建Windows Universal应用程序时会生成appx,appxupload和appxsym文件。
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.
我发现这与我所拥有的msbuild(14.0.23107.0)和VS 2015(14.0.23107.0)的版本不同。
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.
我从提供的模板创建一个空白的Windows通用应用程序后运行以下msbuild命令。我对它做了零改动。我将BuildAppxUploadPackageForUap设置为true以尝试获取appxupload。
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
msbuild App2.sln /t:App2:Rebuild /p:Configuration=Debug /p:Platform=x86 /p:BuildAppxUploadPackageForUap=true
我收到错误消息:
(_ GenerateAppxUploadPackageRecipeFile target) - >
C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1901,5):错误MSB4044:"GenerateAppxPackageRecipe" task没有给出所需参数"AppxManifestXml"的值。
(_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".
我不想在visual studio中这样做,因为这需要在构建服务器上完成。我该如何解决这个问题?
$
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?
推荐答案
我们你有同样的问题,试图找出正确的msbuild选项来创建一个正确的appxupload。   我们已成功使用以下msbuild命令获取appxupload:
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:平台= QUOT; 86" / target:Clean; Rebuild; Publish
msbuild app.sln /p:AppxBundle=Always /p:AppxPackageIsForStore=true /p:BuildAppxUploadPackageForUap=true /p:configuration="Release" /p:Platform="x86" /target:Clean;Rebuild;Publish
这是一个支持x64和x86平台的C#项目。
This is for a C# project that has support for x64 and x86 platforms in it.
上面的msbuild命令确实在构建服务器上产生appxupload但它无效,appxupload中的x64 appx是.NET native,但x86 appx却没有。 .NET Native在项目设置中为Release / x64和Release / x86启用,
,在通过Visual Studio制作AppxUpload时不会发生同样的问题。
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通过msbuild .targets文件搜索以查找另一个选项 / p:UseDotNetNativeToolchain = true您认为这可能有助于强制使用.NET本机,但这似乎也无济于事。
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.
这篇关于如何使用msbuild创建appx store cotainer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!