Windows无法安装软件包,因为此软件包依赖于另一个无法找到的软件包

时间:2016-12-01 03:30:35

标签: jenkins uwp ui-automation coded-ui-tests jenkins-cli

我们正在开发一个UWP应用程序,我们每天都会自动运行Jenkins作业。几天前我们配置了一个新的云从机,我试图运行相同的Jenkins工作,但遗憾的是我在运行powershell脚本以按顺序安装应用程序时遇到Jenkins方面的软件包安装错误对它进行自动化测试。

以下是详细信息错误日志(出于隐私考虑,将删除确切的软件包名称):

Building remotely on gui_slave (codedui) in workspace c:\jenkins\workspace
No emails were triggered.
Jenkins Artifactory Plugin version: 2.7.2
Beginning to resolve Build Info dependencies.
Finished resolving Build Info dependencies.
Beginning to resolve Build Info build dependencies.
Dependency on build [AppName_winGL_build], number [LATEST], pattern [buildfile.zip] - [1] result found.
File 'c:\jenkins\workspace\buildfile.zip' already exists locally, skipping remote download.
Finished resolving Build Info build dependencies.
[workspace] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\hudson5953527437702531475.bat

c:\jenkins\workspace>echo Removing previous package 
Removing previous package

c:\jenkins\workspace>rm -rf AppName_* 

c:\jenkins\workspace>exit 0 
[workspace] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\ADMINI~1\AppData\Local\Temp\hudson1092677328160315251.ps1'"
[workspace] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\hudson8287274088387671359.bat
Removing existing test files
Running test setup script
Found powershell script: C:\jenkins\workspace\AppName_4.1.0.353_Test\Add-AppDevPackage.ps1
Found bundle: C:\jenkins\workspace\AppName_4.1.0.353_Test\AppName_4.1.0.353_x86_x64_arm.appxbundle

Installing app...
Found dependency package(s):
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.NET.Native.Framework.1.3.appx
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.NET.Native.Runtime.1.4.appx
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.VCLibs.x86.14.00.appx
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict 
validation.

Windows cannot install package 89006A2E.AppName because this package depends on another package that couldn't be 
found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by 
CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install; the frameworks with name 
Microsoft.NET.Native.Runtime.1.4 available to the user are 
Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe. Provide the correct framework along wi
Windows cannot install package 89006A2E.AppName because this package depends on another package that couldn't be 
found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by 
CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install; the frameworks with name 
Microsoft.NET.Native.Runtime.1.4 available to the user are 
Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe. Provide the correct framework along with this package.

NOTE: For additional information, look for [ActivityId] 67e7a303-493c-0003-aca6-e7673c49d201 in the Event Log or use 
the command line Get-AppxLog -ActivityID 67e7a303-493c-0003-aca6-e7673c49d201

At C:\jenkins\workspace\AppName_4.1.0.353_Test\Add-AppDevPackage.ps1:388 char:13
+             Add-AppxPackage -Path $DeveloperPackagePath.FullName -Dep ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\jenkins\work..._arm.appxbundle:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

Error: Could not install the app.
Build step 'Execute Windows batch command' marked build as failure
[MSTEST-PLUGIN] Processing test results in file(s) TestResults\*.trx
FATAL: [MSTEST-PLUGIN] No MSTest TRX test report files were found. Configuration error?
Build step 'Publish MSTest test result report' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE

当我们手动运行时,同样的Powershell脚本运行完全正常,但在使用Jenkins运行时则不行。

我试过在MSDN论坛上解决这个问题,但是我们指出问题出在Jenkins身上,而不是windows包。我没有深入到Jenkins的工作岗位,因此在这里寻求帮助

我试图解决这个问题:

1 - 像这样手动添加依赖项 -

<PackageDependency Name="Microsoft.NET.Native.Runtime.1.4" MinVersion="1.4.24201.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />

2 - 重新安装新的运行时。

3 - 将Runtime bundle从包Dependency文件夹复制到我的机器。

直到现在都没有工作。一定的帮助肯定会受到赞赏。

此致

短跑

1 个答案:

答案 0 :(得分:0)

我很高兴与您分享我们自己解决了这个问题。以下是解决此问题的步骤。

  1. 在从属计算机上安装了64位Java。
  2. 使用64位Java命令提示符启动客户端 - C:\ java64location \ java.exe jarfile jenkinssecretargs。注 - 以前使用32位Java命令提示符启动客户端。
  3. 上述命令是任务调度程序中的启动命令。
  4. 这真的很烦人,但我们假设新的从机有问题,用64位运行客户端解决了它。

    将此标记为答案。有人可能觉得它很有用。