

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
MSBUILD Fortify Scan on Jenkins
When I run a msbuild scan job for .NET projects on a Jenkins server using the Windows Command Line option I get this message after the translation has finished and when the scan starts. This works fine when I run all the commands via the command line.
[error]: Unable to load build session with ID "trust-external-AutomatedDisbursement-trunk". See log file for more details.
Finished
Does anyone know how to solve this issue. My script runs the following commands. You can see that buildid is set but somewhere along the line once the translation is complete the scan can't see the buildid.
REM ###########################################################################
echo Cleaning previous scan artifacts
%SOURCEANALYZER% %MEMORY% %LAUNCHERSWITCHES% -b %BUILDID% -clean
)
REM ###########################################################################
echo Running Build Integration
%SOURCEANALYZER% %MEMORY% %LAUNCHERSWITCHES% -b %BUILDID% "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\Jenkins\.jenkins\workspace\trust-external-AutomatedDisbursement-trunk\AD.sln" /p:Configuration="PROD" /p:Platform="Any CPU" /target:"rebuild" /p:VisualStudioVersion=14.0
)
REM ###########################################################################
echo Starting scan
%SOURCEANALYZER% %MEMORY% %LAUNCHERSWITCHES% -b %BUILDID% -scan -f %FPR%
)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Have you manually run the script (to do only the translation) and then do a "-show-files" to see what actually got translated?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
To add to what Mark Feferman said:
One of the times this issue comes up is when the translation command does not translate any files. The way too check for this is, after running a translation command (in your case the MSBUILD command) you would use the "-show-files" option with your build idea, in your case "sourceanalyzer -b trust-external-AutomatedDisbursement-trunk -show-files"
Questions that come to my mind, does MSBUILD build complete successfully? Sometimes committed source code breaks the build (I may or may not have done this on occasion in the past). This is the normal cause of the translation fail in my experience when using MSBUILD.