Downloading the .NET Core agent
The latest version of the dot net core agent can be downloaded in two archive formats to support the native capabilities of Linux (.tar.gz
) and Windows (.zip
). It is especially relevant when working with containers.
All the agents from the links below are provided as self-contained applications, if you need a platform dependent version, please contact Support.
Windows
Windows 10 build 17063 (and higher)
Linux
Ubuntu 20.04 (and higher), Debian 11 (and higher), RHEL 8.10 (and higher)
Alpine
Alpine 3.18 (and higher)
When using the Alpine version of the agent, please make sure your command are referring to the “right” executable (without file extension): SL.DotNet
instead of SL.DotNet.exe
or SL.DotNet.dll
.
Downloading from NuGet
We’re publishing the agent also in Nuget NuGet Gallery | sealights-technologies
Sealights.DotNet.Windows
Sealights.DotNet.Linux
Sealights.DotNet.Alpine
You can download the agents from there.
Sample Scripts for download
Download the agent from NuGet
In the script below:
We download the
.nupkg
file, store it locally, and unzip it (.nupkg
is a ZIP format)We create a symbolic link to the content subfolder to keep compatibility with “existing” script commands (referring to `sl-dotnet-agent`) and keep things short and simple
$SL_PACKAGE = "Sealights.DotNet.Windows"
$NUGET_URL = "https://www.nuget.org/api/v2/package"
$SL_VERSION = "3.13.0"
$packageName = "sealights-dotnet-windows-$SL_VERSION.nupkg"
$extractPath = "./sealights-dotnet-windows-$SL_VERSION"
Invoke-WebRequest -Uri "$NUGET_URL/$SL_PACKAGE/$SL_VERSION" -OutFile $packageName -UseBasicParsing
Expand-Archive -Path $packageName -DestinationPath $extractPath -Force
New-Item -ItemType SymbolicLink -Path "./sl-dotnet-agent" -Target "$extractPath/content" -Force | Out-Null
Write-Output "[Sealights] Installed version is: $(Get-Content ./sl-dotnet-agent/version.txt)"
Download the agent from Sealights
$global:ProgressPreference = "SilentlyContinue"
iwr -OutFile sealights-dotnet-agent.zip -UseBasicParsing -Uri https://agents.sealights.co/dotnetcore/latest/sealights-dotnet-agent-windows-self-contained.zip
Expand-Archive .\sealights-dotnet-agent.zip -DestinationPath sl-dotnet-agent -Force
Write-Output "[Sealights] .NetCore Agent version is: $(Get-Content .\sl-dotnet-agent\version.txt)"
In some Windows configurations, it may be necessary for you to enforce a compatible SSL protocol
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls13
Retrieve the agent version selected in your Settings page
In the script below, we retrieve the version selected in the dashboard settings page
$SEALIGHTS_URL = "mydomain.sealights.co"
$headers = @{
accept = "application/json"
Authorization = "Bearer $env:SEALIGHTS_AGENT_TOKEN"
}
$version = (Invoke-RestMethod "https://$SEALIGHTS_URL/api/v2/agents/dotnet/recommended" -Headers $headers).agent.version
Write-Output "[Sealights] Selected .NET version in Dashboard settings is: $version"
Security
If you download and copy the agent manually, its files might get blocked by Windows OS.
You have two options to unblock them, to unblock them:
Right-click both the
SL.DotNet.exe
andSL.DotNet.dll
files and check the Unblock check box in the security section.You can also use the following PowerShell command:
Get-ChildItem -Path 'C:\Sealights\agent\' -Recurse | Unblock-File
( assuming they were unzipped in the sameC:\Sealights\agent
folder)

Last updated
Was this helpful?