VisualGDB Linux Project on Windows SubSystem not working in w/ CI

Sysprogs forums Forums VisualGDB VisualGDB Linux Project on Windows SubSystem not working in w/ CI

This topic contains 2 replies, has 2 voices, and was last updated by  Chief 1 month, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #28676



    I’ve recently started a project to port c++ code written for Windows over to Linux. I’m using the linux subsystem on my windows machine which has CI setup with Gitlab and I’m looking to get the Linux building in CI as the Windows variant is already doing so. I’ve got the basic project building within Visual Studio and I am even able to get the projects compiling with a batch script I wrote (which gets executed during the build plan of CI).

    When I run the batch script using powershell manually, everything compiles perfectly however, when attempting to automatically compile via the CI the following messages appears and fails the build. The only difference between the working and failing version is the Gitlab Runner however, this runs a batch script so when I run the script and it works theoretically the CI should also work?

    “C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\SysprogsPlatform.targets(98,2): warning : Missing toolchain profile for localhost-lxss, ID=’com.sysprogs.imported.bin’, version=’10.1.0/(Ubuntu/r0′. IntelliSense may produce incorrect results. [H:\Gitlab-Runner\builds\4….”

    I’m using gcc-10/g++-10 and everything builds fine but the above message is the only difference between the working output and the crashing output.

    Any thoughts?? Am I missing something obvious?

    Thanks in advanced



    No problem, we will explain what is going on.

    In order to avoid hardcoding toolchain parameters (e.g. the exact path) in the project files, VisualGDB maintains a per-user registry of installed toolchains under %LOCALAPPDATA%\VisualGDB\ToolchainProfiles. This registry is updated each time VisualGDB is loaded in Visual Studio (e.g. when opening a project) and is explicitly rebuilt when you run the Tools->VisualGDB->Manage VisualGDB Packages command. You can find a detailed documentation on the toolchain registry here:

    The “missing toolchain profile” error happens when you try to build a project that references a toolchain that is not present in the toolchain registry. Most likely, your CI setup is using a different user account (and hence a different %LOCALAPPDATA%, so VisualGDB never gets a chance to update the toolchain registry in that environment).

    You can work around it via one of the following ways:

    • Manually copy the relevant parts of the toolchain registry to the %LOCALAPPDATA% of the CI user account.
    • Since VisualGDB’s MSBuild subsystem builds remote projects by generating a temporary Makefile (or a ninja file), you can locate it on the development machine, check it into source control, and configure your CI environment to build it instead. This way you won’t need to install neither VisualGDB, nor Visual Studio on the CI machine, however you would lose the ability to run VisualGDB-level custom actions.

    Let us know if you have any further questions and we will be happy to help.




    Just one thing to say, Danke Schon!

    It makes sense to how the toolchain profiles is organised. All I had to do was make sure the CI was using the account, within the windows service properties, which all the ToolChains are set up on and works a charm!

    Once again, thank you very much!

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

You must be logged in to reply to this topic.