.NET Build
Run dotnet publish automatically with no scripting. Stage artifacts for downstream deployment in Release or Debug mode using Opsera's no-code automation or custom commands.
.NET Core.NET FrameworkNo-code modeCustom mode○
Prerequisites
Opsera account with pipeline creation permissions
Jenkins tool registered in Opsera Tool Registry
SCM repository with a valid .NET project (.csproj or .sln file) registered
Output directory for published artifacts defined
Pipeline setup
Create the pipeline and add stepPipelines → Create Pipeline → blank template. Add step: Tool = .NET CLI, Step Type = Script.
Configure source
Select Jenkins Tool, Job, SCM Account, Repository, and Branch.
Choose build mode
Opsera mode — set .NET CLI Type, SDK Version, Project Workspace, Configuration Type, Output File Path, and Output File Name. dotnet restore runs automatically before build.
Custom mode — a command entry field appears. Enter your build/publish commands manually along with Output File Path and Name.4Run and validateTrigger the pipeline. Monitor real-time logs and confirm artifacts are staged at the defined workspace path.
Configuration reference
.NET CLI Type
.NET (Core) or .NET Framework
.NET SDK Version
Select SDK version (e.g. 3.1, 6.0, 8.0)
Project Workspace
Path to solution or project file
Configuration Type
Release (default) or Debug
Output File Path
Directory for captured artifacts (e.g. publish/)
Output File Name
Exact or pattern-based name (e.g. **/*.zip)
Points to remember
dotnet restoreruns automatically in Opsera mode before build — no need to add it manually to commands.Use
publish/**/*.zipas the Output File Path pattern to capture artifacts from multiple projects in a single step.Opsera validates the Output File Path before build execution — pipelines fail early with a clear error if the path is missing or misconfigured.Secrets (API keys, passwords) are stored in Opsera's Vault and injected as environment variables at runtime.They never appear in logs.The Configuration Type can be overridden at runtime by defining a variable (e.g.
BUILD_CONFIGURATION) and referencing it as${BUILD_CONFIGURATION}.
FAQs
Can I build multiple projects in one step?
Yes. Point Project Workspace to a folder containing multiple .csproj or .sln files and set Output File Path to a pattern like publish/**/*.zip. Opsera detects all outputs automatically.
Last updated

