【发布时间】:2021-08-19 13:47:01
【问题描述】:
我有一个 Azure 管道,其中包含一个用于 WPF 解决方案的 MSIX 构建和打包步骤,该解决方案上周开始偶尔失败(管道定义没有更改),现在每次都失败并出现错误:
C:\Program Files\dotnet\sdk\5.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'D:\a\8\s\xxxxxx.Packager\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [D:\a\8\s\xxxxxx.Packager\xxxxxx.Packager.wapproj]
有问题的项目是 UWP 打包项目,没有 nuget 引用,我已经成功运行了许多管道。
我可以在日志中看到的区别是失败的构建(在上述错误之前)似乎缺少一行:
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn
我似乎围绕上述错误提出了一些其他问题和答案,但没有一个具体指向上述问题。 wapproj 包含在解决方案中。对 .wapproj 执行 nuget 还原并不能解决问题。
很奇怪,它正在工作,但突然没有对管道进行任何更改。
【问题讨论】:
标签: azure-devops azure-devops-pipelines msix