Legacy .NET agent - Scanning the build binaries

The SeaLights .NET agent can scan the binaries after the build process to gather the build structure.

Generating a session ID

Before running the build scan and tests, you need to create a session ID. The session ID is provided for each step in order to link them together as one complete cycle

SL.DotNet.exe config --appName "myApp" --branchName "master" --buildName $(Get-Date -Format "yyyyMMdd_HHmm") --includeNamespace myNameSpace.* --buildSessionIdFile buildSessionId.txt

As a buildName you can use also the Version generated on the application’s executables (DLL or EXE) via the following command (Get-Command "c:\path\to\binaries").FileVersionInfo.FileVersionRaw.ToString()

Scanning the binaries

Run the scan of your binaries using the SeaLights agent with the following command:

SL.DotNet.exe scan --buildSessionIdFile buildSessionId.txt --workspacePath c:\path\to\binaries --ignoreGeneratedCode true

The workspacePath folder must contain all the project’s PDB files.

As SeaLights is using the compilation method's bytecode signature (Hash ID) to generate a unique identifier for each method, it is important NOT to recompile the application between the scan command and the deployment. The scanned build's artefact (DLL, EXE) MUST be from the exact same compilation as the one deployed.