Improve C#.Net Entity Framework based project build CI/CD performance (from ~55 mins to ~3 mins)

Balram Chavan
2 min readMay 30, 2024

If you are using Entity Framework for ORM in your C#.NET project, there are few files generated which might slow down your CI/CD build project.

One way is to make sure you are on top of it is to keep merging old migration files, resulting having at max 2–3 migration files.
Here is the StackOverflow disucssion for different version of EF.

here is an article for EF 5

Another option is to ignore the .designer.cs files in your migration project.

We have an API project which got a commit pushed with humangos .designer.cs files each containing around 56, 0000 lines. It dragged up our Azure DevOps CI/CD build pipeline from 10 minutes to 55 minutes.
What I did was updated the .csproj file to ignore all .designer.cs files during build.

After this change, the build pipeline got dramatic change from 55 minutes to around 3 minutes.