Example C# Pipeline

C# Example

This guide covers configuring continuous integration pipelines for C# projects. If you’re new to Drone please read our Tutorial and build configuration guides first.

Build and Test

In the below example we demonstrate a pipeline that executes dotnet publish and dotnet test commands. These commands are executed inside a Docker container, downloaded at runtime from DockerHub.

kind: pipeline
name: default

- name: test
  image: mcr.microsoft.com/dotnet/sdk:6.0
  - dotnet build
  - dotnet test

Please note that you can use any Docker image in your pipeline from any Docker registry. You can use the official dotnet sdk or aspnet images, or your can bring your own.