At 19:10 27.10.2022, you wrote:
>I have what should be a simple project, using msbuild for VS2019 to build a particular configuration of my solution. When I run in Visual Studio it works. When I run via msbuild from the command line it works. When I try to build the project using MSbuild in Jenkins it fails. When I try to run msbuild via a command prompt through Jenkins it fails. It gives me the " error : Exception has been thrown by the target of an invocation." every time.
>
>The developers don't have any idea how to fix it because it never fails from Visual Studio, only when the job is sent from Jenkins. FYI, I can rebuild this entire solution for my windows release through Jenkins with no issues. It only fails when trying to compile our VisualGDB platform for my linux configurations. And again, only fails when the compile is started by Jenkins.
Jenkins probably runs as a different user than when you log in
into your build agent yourself. Try to imitate what Jenkins is doing
e.g. ssh as jenkins into the build agent and start the build.
The environment variables might be different, rights, PATH etc
bye Fabi