Sysprogs forums › Forums › VisualGDB › Guide for getting VisualGDB MSBuild to work on a build agent?
- This topic has 11 replies, 4 voices, and was last updated 4 years, 1 month ago by jafeucht.
-
AuthorPosts
-
December 8, 2016 at 15:49 #9746CurtisHxParticipant
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.
December 8, 2016 at 16:05 #9748CurtisHxParticipantTurns out I just needed to reboot the build agent.
DOH
September 14, 2017 at 11:33 #12385HaqimParticipantHello,
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
September 15, 2017 at 04:47 #12393supportKeymasterHi,
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.
September 15, 2017 at 08:23 #12399September 16, 2017 at 05:13 #12409supportKeymasterHi,
Thanks for confirming this. Could you please try adding the reference to the VisualGDB directory to msbuild command line explicitly as described here?
September 19, 2017 at 08:41 #12442HaqimParticipantI 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.September 23, 2017 at 05:17 #12481supportKeymasterHi,
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.
October 10, 2017 at 16:25 #12629HaqimParticipantHello,
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.October 14, 2017 at 01:51 #12650supportKeymasterHi,
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 ‘\’).
October 7, 2020 at 17:26 #29206jafeuchtParticipantIs 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.
October 7, 2020 at 22:20 #29209jafeuchtParticipantI 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.
-
AuthorPosts
- You must be logged in to reply to this topic.