Skip to content

Support multiple solution files for .NET projects during SAST Scanning

Problem to solve

Currently, when a .NET repository has multiple solution files (.sln), the SAST scanning job (Security Code Scan) will fail as it's not sure which solution file to execute. This will prevent .NET projects from completing a scan and detecting any vulnerabilities.

MSBUILD : error MSB1050: Specify which project or solution file to use because 
the folder "/builds/NETProject" contains more than one project or solution file.

Proposal

Pass a variable to tell the scanner which solution file to execute.

security-code-scan:
  variables:
    NET_BUILD_PATH:
      - solution_one.sln
      - solution_two.sln 

Links / references