Automated build with msbuild and gitlab-ci

Sysprogs forums Forums VisualGDB Automated build with msbuild and gitlab-ci

This topic contains 3 replies, has 2 voices, and was last updated by  support 2 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24944

    kyokatsury
    Participant

    I am trying to make an automated build for my project but I am stuck on an issue.

    All the gitlab runner part is OK and I can build the project in a prompt windows with msbuild. The issue is that, if the msbuild command is launched via the runner, the process is immediatelly locked.

    Microsoft (R)-Buildmodul, Version 12.0.40629.0
    [Microsoft .NET Framework, Version 4.0.30319.42000]
    Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
    Der Buildvorgang wurde am 08.05.2019 14:43:01 gestartet.
    1>Projekt "path/to/project.vcxproj" auf Knoten "1", Build Ziel(e).
    Build:
    "C:\Program Files (x86)\Sysprogs\VisualGDB\\VisualGDB.exe" /build "path/to/project.vcxproj" "/solution:""/config:Release""/platform:Win32"

    Could you please help me to understand what is the difference between the prompt windows and the runner gitlab ?

    • This topic was modified 2 months, 1 week ago by  kyokatsury.
    #24949

    support
    Keymaster

    Most likely, VisualGDB was not activated on the machine/account where you are running the build and hence it tries to display the key prompt.

    The easiest way to get it to work would be to ensure you can build the projects manually on the same machine using the same user account.

    We would also advise setting the AGENT_WORKFOLDER environment variable (used by TFS) to a non-empty value so that VisualGDB will activate the unattended mode, reducing the amount of prompts and GUI.

    If this doesn’t help, please let us know and we will help you get it to work.

    #24950

    kyokatsury
    Participant

    Thank you for your help, the issue was that the build via the runner is done by the System and by the user via the command line.
    I launched the gitlab runner with

    and it works fine.

    In case it could help someone else, to start the runner for a user, you need to grand “Log on as a service” for the user

    • This reply was modified 2 months, 1 week ago by  support. Reason: formatting
    #24954

    support
    Keymaster

    Thanks for sharing this and good to know it works. We would still advise setting the AGENT_WORKFOLDER variable, as it would suppress various interactive prompts (e.g. about activating the new version after an update, or installing missing toolchains/BSPs).

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.