首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure DevOps @UWP测试任务: DEP7100:未能激活app

Azure DevOps @UWP测试任务: DEP7100:未能激活app
EN

Stack Overflow用户
提问于 2019-10-24 09:31:28
回答 2查看 397关注 0票数 0

我有一个UWP项目和一个测试项目。本地测试通行证。我为这些项目配置了Azure DevOps管道。测试也通过了蔚蓝DevOps!但是,测试任务在下一个错误中失败:

代码语言:javascript
复制
DEP7100: Failed to activate app '748f39e5-19db-43a2-ba4a-fb4b137bdbf3_4r2k005x7atxw!vstest.executionengine.universal.App' with parameters '--port 50037 --endpoint 127.0.0.1:050037 --role client --parentprocessid 5044 --telemetryoptedin false'. The app didn't start.
The app didn't start.
DEP7100: Failed to activate app '748f39e5-19db-43a2-ba4a-fb4b137bdbf3_4r2k005x7atxw!vstest.executionengine.universal.App' with parameters '--port 50037 --endpoint 127.0.0.1:050037 --role client --parentprocessid 5044 --telemetryoptedin false'. The app didn't start.
The app didn't start.
App activation failed.
Failed to initialize client proxy: could not connect to test process.
DEP7100: Failed to activate app '748f39e5-19db-43a2-ba4a-fb4b137bdbf3_4r2k005x7atxw!vstest.executionengine.universal.App' with parameters '--port 50040 --endpoint 127.0.0.1:050040 --role client --parentprocessid 5044 --telemetryoptedin false'. The app didn't start.
The app didn't start.
DEP7100: Failed to activate app '748f39e5-19db-43a2-ba4a-fb4b137bdbf3_4r2k005x7atxw!vstest.executionengine.universal.App' with parameters '--port 50040 --endpoint 127.0.0.1:050040 --role client --parentprocessid 5044 --telemetryoptedin false'. The app didn't start.
The app didn't start.

在这里,您可以找到带UWP项目和测试项目的回购:测试

下面是最后一个构建,您可以看到,有两个测试通过了( x84 1用于x64):build/results?buildId=3&view=ms.vss-test-web.build-test-results-tab

下面是构建本身:构建/结果?buildId=3&view=日志

不知道我的配置有什么问题吗?

更新

我尝试了新的东西:

1)我创建了另一个带有自我托管代理的brach,称为with_self_hosted_agent。最后一个构建在这里。作为一个自我托管的特工,我用了我的笔记本电脑。构建成功,但测试甚至没有运行(没有运气):构建/结果?buildId=10

2)我改变了只使用x86架构。构建唯一的x86在这里(没有运气):构建/结果?buildId=9

3)在另一个名为with_1.3.1_version的分支上试用1.3.1版本。与主分支相同的结果:测试正在运行,但构建失败。(运气不好):构建/结果?buildId=11

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-11-01 13:24:14

出发地:https://github.com/MicrosoftDocs/vsts-docs/issues/6108

结果是,有两个.appxrecipe文件。一个在发布文件夹中,另一个在上传文件夹中。而其中一个,即上传文件夹中的失败。因为这个建筑失败了。因此,这里的解决方案是只使用释放文件夹中的文件。YML文件如下所示:

代码语言:javascript
复制
# Universal Windows Platform
# Build a Universal Windows Platform project using Visual Studio.
# Add steps that test and distribute an app, save build artifacts, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'x86|x64'
  buildConfiguration: 'Release'
  appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    platform: 'x86'
    solution: '$(solution)'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload'

- task: VSTest@2
  inputs:
    platform: 'x86|x64'
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\Release\UnitTestProject1.build.appxrecipe <-- HERE IS FIX
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'
票数 1
EN

Stack Overflow用户

发布于 2019-10-25 03:52:10

Azure DevOps @UWP测试任务: DEP7100:未能激活app

根据错误日志:

代码语言:javascript
复制
[error]App activation failed.
[error]Failed to initialize client proxy: could not connect to test process.

您可以尝试在测试项目文件.csproj中执行以下步骤

  • 将PackageReference更改为MSTest.TestAdapter,将MSTest.TestFramework更改为1.3.1
  • 添加 PackageReference 在测试项目文件中。

有关更多细节,请查看这条线

此外,我注意到您正在使用Microsoft托管代理来构建您的项目,但根据文档Visual Studio 2019平台的目标定位与兼容性

当使用Windows 2012 R2或Windows 2016时,可以从命令行构建通用Windows应用程序。

所以,我不确定我们能否在Windows 2019上运行UWP应用程序。

作为解决办法,您可以在Windows 10机器上构建自己的代理。

希望这能有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58538362

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档