Azure DevOps中的UWP AppxBundle-错误MSB4126-x86 | x64 | ARM

时间:2018-12-13 21:00:35

标签: uwp msbuild azure-devops

我正在尝试使用Azure DevOps构建和打包我的UWP应用程序,但是在尝试为所有3个平台创建appxbundle时使用自定义解决方案配置名称时收到错误Error MSB4126: The specified solution configuration "Release|x64" is invalid.。在Visual Studio中使用“创建应用程序包”选项可以正常工作。

在尝试构建和打包appxbundle时,第一个平台(x86)正常工作,因为它使用下面的MSBuild语句中指定的配置。但是随后的x64或ARM构建失败,因为由于某种原因,它试图使用默认配置“发布”。

由Azure DevOps运行的MSBuild命令:

"D:\a\1\s\mysolution.sln" /nologo /nr:false /t:"Clean" 
  /p:AppxBundlePlatforms="x86|x64|ARM" 
  /p:AppxPackageDir="D:\a\1\a\AppxPackages\\" 
  /p:AppxBundle=Always 
  /p:UapAppxPackageBuildMode=StoreUpload 
  /p:platform="x86" 
  /p:configuration="App_Release_vNext" 
  /p:VisualStudioVersion="15.0" 
  /p:_MSDeployUserAgent="VSTS_5f450c0a-570b-4d23-8898-51fc0d563e83_build_194_0"

日志中的第一个内部版本可以正确使用MSBuild命令中的指定配置:

2018-12-13T20:19:17.9223466Z Project "D:\a\1\s\mysolution.sln" on node 1 (Clean target(s)).
2018-12-13T20:19:17.9233806Z ValidateSolutionConfiguration:
2018-12-13T20:19:17.9234638Z   Building solution configuration "App_Release_vNext|x86".

日志中的第二个版本错误地使用了MSBuild命令的默认配置:

2018-12-13T20:33:10.9079402Z Project "D:\a\1\s\folder\myproject.csproj" (12) is building "D:\a\1\s\mysolution.sln" (1:2) on node 1 (GetSolutionConfigurationContents target(s)).
2018-12-13T20:33:10.9079592Z ValidateSolutionConfiguration:
2018-12-13T20:33:10.9079706Z   Building solution configuration "Release|x64".
2018-12-13T20:33:10.9864815Z Done Building Project "D:\a\1\s\mysolution.sln" (GetSolutionConfigurationContents target(s)).
2018-12-13T20:33:11.4091745Z ##[error]D:\a\1\s\mysolution.sln.metaproj(0,0): Error MSB4126: The specified solution configuration "Release|x64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration.

0 个答案:

没有答案
相关问题