简体   繁体   English

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

[英]Windows cannot install package because this package depends on another package that couldn't be found

We are developing an UWP app where we have automated Jenkins jobs runs everyday. 我们正在开发一个UWP应用,其中每天都有自动运行的Jenkins作业。 Couple of days back we configured a new cloud slave machine where I was trying to run the same Jenkins job, but unfortunately I'm encountering a package installation error from Jenkins side while running the powershell script to install the App in-order to run automations tests on it. 几天前,我们在一个新的云从属机器上配置了一个我试图运行相同的Jenkins作业的机器,但不幸的是,我在运行Powershell脚本以按顺序安装App时遇到了Jenkins方面的软件包安装错误测试。

Here is details error log(exact package name are removed for privacy concern): 这是详细信息错误日志(出于隐私考虑,删除了确切的软件包名称):

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

The same Powershell script runs perfectly fine when we run it manually but not when run with Jenkins. 当我们手动运行相同的Powershell脚本时,运行得很好,但与Jenkins一起运行时,它运行得很好。

I tried solving this problem at MSDN forum, but got pointed out that the problem lies with Jenkins but not windows package. 我尝试在MSDN论坛上解决此问题,但指出问题出在Jenkins,而不是Windows软件包。 I'm not deep into Jenkins jobs thus looking out for help over here 我对Jenkins的工作不了解,因此在这里寻求帮助

What have I tried to solve this issue: 我试图解决什么问题:

1 - Adding the dependency manually like this - 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 - Reinstalling the fresh Runtime. 2-重新安装全新的运行系统。

3 - Copying the Runtime bundle from package Dependency folder to my machine. 3-将运行时捆绑包从软件包Dependency文件夹复制到我的机器上。

Nothing worked till now. 到目前为止没有任何工作。 Some help would definitely be appreciated. 一些帮助将不胜感激。

Regards, 问候,

Dash 短跑

I'm happy to share with you that we fixed this problem by ourselves. 我很高兴与您分享我们自己解决了这个问题。 Below are the steps fixed this problem. 下面是解决此问题的步骤。

  1. Installed 64 bit Java on the slave machine. 在从机上安装了64位Java。
  2. The client was launched using the 64 bit Java command prompt like this - C:\\java64location\\java.exe jarfile jenkinssecretargs. 客户端是使用64位Java命令提示符(例如C:\\ java64location \\ java.exe jarfile jenkinssecretargs)启动的。 Note - Previously the client was launched using the 32bit Java command prompt. 注-以前,客户端是使用32位Java命令提示符启动的。
  3. The above command is a startup command in task scheduler. 上面的命令是任务计划程序中的启动命令。

This is really annoying but we suppose there was a problem with the new slave machine and running the client using 64 bit solved it. 这确实很烦人,但我们认为新的从属计算机存在问题,并且使用64位运行客户端可以解决该问题。

Marking this as an answer. 将此标记为答案。 Someone might find it useful. 有人可能会觉得有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM