Guide for getting VisualGDB MSBuild to work on a build agent?

Sysprogs forums Forums VisualGDB Guide for getting VisualGDB MSBuild to work on a build agent?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #9746
    CurtisHx
    Participant

    I’m having a dickens of time getting the VisualGDB MSBuild process up and going on our TFS Build Agents.  I installed the latest version of VisualGDB and thought that was it.

    However, I’ve been running into problems on every build.  First build attempt resulted in this error:

    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\VisualGDB\Platform.default.props (2): The imported project “C:\MSBuild\SysprogsPlatform.default.props” was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

    C:\MSBuild didn’t exist on the build agent.  So I copied the MSBuild folder from C:\Program Files (x86)\Sysprog\VisualGDB to C:\.  Solved that problem.

    Tried to build again, and this time it errored with:
    C:\MSBuild\SysprogsPlatform.targets (51): Missing C:\SysGCC\arm-eabi\toolchain.props. Please regenerate it via VisualGDB.

    C:\SysGCC\arm-eabi\toolchain.props didn’t exist.  Copied it in from my machine.  Fixed that problem.

    On the 3rd build attempt, it errored with:

    C:\MSBuild\Targets\FastUpToDateCheck.targets (5): The “InitializeFastUpToDateCheckFile” task could not be loaded from the assembly \Sysprogs.Build.Tasks.dll. Could not load file or assembly ‘file:///C:\Sysprogs.Build.Tasks.dll’ or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

    C:\Sysprogs.Build.Tasks.dll does not exist.  I feel like the installation went wrong somewhere, but there were not any errors or problems installing.  Sysprogs.Build.Tasks.dll exists in C:\Program Files (x86)\Sysprogs\VisualGDB.

    What do I need to do to get this to work on a TFS build agent?

    • This topic was modified 7 years, 11 months ago by CurtisHx.
    #9748
    CurtisHx
    Participant

    Turns out I just needed to reboot the build agent.

    DOH

    #12385
    Haqim
    Participant

    Hello,

     

    i’m working on the same topic, but for me the rebooting doesn’t help…

    I have:

    • Visual Studio 2015
    • TFS 2015 with git repo
    • Visual GDB v5.2R9

     

    When i build over tfs agent, i get:

    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\FastUpToDateCheck.targets(5,2): Error MSB4062: The “InitializeFastUpToDateCheckFile” task could not be loaded from the assembly C:\Program Files (x86)\Sysprogs\VisualGDB\\Sysprogs.Build.Tasks.dll. Could not load file or assembly ‘VisualGDB, Version=5.2.15.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

     

    • C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\FastUpToDateCheck.targets -> is there and ok
    • C:\Program Files (x86)\Sysprogs\VisualGDB\Sysprogs.Build.Tasks.dll -> is there and ok

     

    Any ideas / help ?!

     

    regards

     

    #12393
    support
    Keymaster

    Hi,

    The Sysprogs.Build.Tasks assembly actually imports many methods from VisualGDB.exe (VisualGDBCore.dll on v5.3+). Please ensure that this assembly is also present in the Sysprogs\VisualGDB directory.

    #12399
    Haqim
    Participant

    Yes, the file is around.

     

     

    Attachments:
    You must be logged in to view attached files.
    #12409
    support
    Keymaster

    Hi,

    Thanks for confirming this. Could you please try adding the reference to the VisualGDB directory to msbuild command line explicitly as described here?

    #12442
    Haqim
    Participant

    I tried, doesn’t help.

     

    On a note – it is no problem to build the project / solution in VS2015, but the TFS Agent struggles…

     

    I got the agent to verbose mode with detailed / diagnostic output.

     

    Maybe that helps to get it running? But i don’t see anything at the moment…

    But the Build Clean is working – the Build itself not?!

     

    regards

    • This reply was modified 7 years, 2 months ago by Haqim.
    Attachments:
    You must be logged in to view attached files.
    #12481
    support
    Keymaster

    Hi,

    Sorry for the delay. We will be able to investigate this in more detail next week after releasing v5.3 RC1. The problem happens because TFS is using a different assembly search path than the regular VS and cannot load the VisualGDB assembly.

    Our best advice would be to try different TFS settings related to assembly search path (e.g. see this post) to ensure the build agent can locate the VisualGDB assembly.

    #12629
    Haqim
    Participant

    Hello,

    i still haven’t solved this yet…

     

    I changed my TFS Agent from a service to an executable, running on my PC, in hope of some local path things that now the agent could find. Without success.

    I also tried to add the Visual GDB Path as a specific assembly search path. Without success.

     

    I hope we can still get this up & running…

     

    New log with the actual setup attached.

    Attachments:
    You must be logged in to view attached files.
    #12650
    support
    Keymaster

    Hi,

    OK, we have published a detailed tutorial showing how to use VisualGDB with TFS here: https://visualgdb.com/tutorials/ci/tfs/

    Please try updating your VisualGDB to the latest v5.3 and follow the tutorial. Please try checking that the %VISUALGDB_DIR% variable is defined correctly in the command prompt window where you launch the build agent (it should not have a trailing ‘\’).

    #29206
    jafeucht
    Participant

    Is there also a tutorial on how to configure VisualGDB projects to build through TeamCity? I have a setup where I can envoke the build of a VisualGDB project with msbuild.exe, however when I try to set up the same command with TeamCity, I find:

    • TeamCity needs to be set up with env.VCTargetsPath (set to C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\)
    • Need to set env.TOOLCHAIN_ROOT to “C:\sysgcc”

    However, my next challenge is to figure out what to do about this same FastUpToDateCheck.targets error MSB4062:

    [dotnet msbuild] C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\FastUpToDateCheck.targets(5,2): error MSB4062: The “InitializeFastUpToDateCheckFile” task could not be loaded from the assembly C:\Program Files (x86)\Sysprogs\VisualGDB\\Sysprogs.Build.Tasks.dll. Could not load file or assembly ‘Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

    I even set up TeamCity service to use the same user account which I’m using to successfully build my VisualGDB projects with TeamCity, but I can’t seem to get it to compile.

    • This reply was modified 4 years, 1 month ago by jafeucht.
    • This reply was modified 4 years, 1 month ago by jafeucht.
    #29209
    jafeucht
    Participant

    I found out what my issue is. I had selected “Cross-Platform MSBuild” in the build step “MSBuild Version” setting rather than “MSBuild 2019”. Switching that fixed my issue.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.