【问题标题】:TwinCAT3 build on JenkinsTwinCAT3 基于 Jenkins 构建
【发布时间】:2020-05-24 01:05:00
【问题描述】:

是否可以在 Jenkins 上构建 TwinCAT3 解决方案? 我已经用 msbuild 和 devenv.com 试过了。

msbuild:MSBuild 不支持 *.tsproj devenv.com .tspproj: 找不到该项目类型所基于的应用程序

【问题讨论】:

    标签: jenkins twincat


    【解决方案1】:

    您不能使用 MSBuild 构建 PLC 项目,因为它不是使用 MSBuild 构建的,而是通过 CodeSYS 编译器构建的。

    不过,您可以build the whole solution 使用:

    start /wait "" "%ProgramFiles(x86)%/Microsoft Visual Studio 12.0/Common7/IDE/devenv.exe" project.sln /Rebuild "Debug|TwinCAT RT (x86)" /Out logfile.log.

    2020 年 5 月 23 日编辑

    或者您可以使用 (see MSDN documentation) 从解决方案构建单个项目。

    start /wait "" "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" "C:\path\to\solution.sln" /Project "relative\path\to\PLC.plcproj" /Rebuild "Debug|TwinCAT RT (x86)" /Out logfile.log

    【讨论】:

      【解决方案2】:

      嗨,Eva,欢迎来到堆栈溢出。 是的,这是可能的,但您已经通过了TwinCAT automation interface。借助自动化界面,您可以访问 TwinCAT 中的大部分功能(包括构建),但可以通过编程或脚本语言来访问,而这些语言又可以从 Jenkins 中运行。

      我已经写了一系列文章,由四个部分组成,介绍如何从 Jenkins 运行 TwinCAT 编译,可在此处获得:

      https://alltwincat.com/2018/07/05/ci-cd-with-twincat-part-one/

      https://alltwincat.com/2018/07/26/ci-cd-with-twincat-part-two/

      https://alltwincat.com/2018/08/28/ci-cd-with-twincat-part-three/

      https://alltwincat.com/2018/10/04/ci-cd-with-twincat-part-four/

      祝你好运!

      【讨论】:

      • 谢谢。我会看的。
      猜你喜欢
      • 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
      相关资源
      最近更新 更多