C# on .NET Core
How to build a C# project in Codefresh
Codefresh can work with any .NET core application very easily as there are official Docker images from Microsoft.
The example C# project
You can see the example project at https://github.com/dotnet-architecture/eShopOnWeb. The repository contains a C# Web project with 3 kinds of tests. It has different tags for each version of .NET Core and has
docker-compose.ymlfile for local development
testsdirectory with all types of tests
- a Dockerfile at
There are also previous releases at https://github.com/dotnet-architecture/eShopOnWeb/releases.
Create a CI pipeline for C# applications
Creating a CI/CD pipeline for C# is very easy, because Codefresh can run any SDK image version that you wish.
Here is the full pipeline that compiles the application after checking out the code.
- clones the source code
- Uses the official
mcr.microsoft.com/dotnet/core/sdk:3.0image to run unit/integration/functional tests in 3 different folders
- Builds the application docker image using the root folder as Docker context but with the Dockerfile located at
You can see the resulting image in the private Codefresh registry: