【问题标题】:UWP Build on JenkinsUWP 基于 Jenkins 构建
【发布时间】:2015-10-13 19:12:08
【问题描述】:

我正在尝试在 Jenkins 上构建 C# UWP,但出现以下错误:

XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll'

构建工具 2015 和 VS2015 均安装在 Jenkins 服务器上,构建脚本针对 MSbuild 14 版

【问题讨论】:

    标签: c# .net jenkins continuous-integration uwp


    【解决方案1】:

    直接脱离 UWP 应用版本控制的干净源代码树需要运行 NuGet 以查找 project.json 文件中指定的依赖项。

    作为开发人员,这是 Visual Studio 2015 通常为您做的事情。

    在构建服务器上,您需要运行命令行 NuGet 3.x 可执行文件,以便在构建运行(MSBuild 部分)之前在您的构建机器上提取所有依赖项。

    转到http://dist.nuget.org/index.html 以获取命令行 NuGet.exe。

    该命令的格式为nuget.exe restore [MyApp.sln]

    【讨论】:

    • 这解决了这个问题,将 nuget.exe 添加到 CI 服务器及其 PATH 环境变量中,并添加了一个构建步骤来恢复要构建的包。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-10-11
    • 1970-01-01
    • 2012-06-01
    • 2019-08-02
    • 1970-01-01
    • 2017-05-22
    • 2014-03-03
    相关资源
    最近更新 更多