
EF Core Migration Bundles
are standalone executable files that contain one or more Entity Framework Core
migrations and can be applied directly to a database. They are particularly useful for deploying migrations independently of the source code or development environment, e.g. in production environments.
Using migration bundles simplifies the deployment process as no additional software or configuration is required to perform the migrations. In CI/CD systems like Azure DevOps
in particular, they can be executed across all platforms on all operating systems and therefore offer a flexible alternative to DACPAC deployments
, which are often dependent on Windows tooling.
The inadequate documentation
A very big disadvantage of EF Migration Bundles is the documentation. Even for years there has been virtually no documentation or working examples - so you have to try out a lot. This is also the case here.
The command timeout
If a migration takes longer than 30 seconds - which is the standard - this is acknowledged by an exception during deployment. In the case of MSSQL, this looks like this:
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Unfortunately, the exact timeout is not specified here - but it is the command timeout . The error message in conjunction with MySQL is slightly better here.
MySql.Data.MySqlClient.MySqlException (0x80004005): The Command Timeout expired before the operation completed.
The best way to increase the command timeout is directly via the connection string; in the case of MSSQL via Command Timeout=xyz, where xyz is a number representing the seconds.
Together with Azure DevOps Pipeline YAML , a complete example with 600 seconds timeout (10 minutes) looks like this:
1- task: AzureCLI@2
2 displayName: Azure SQL Schema Deployment
3 inputs:
4 azureSubscription: ${{ parameters.azureConnectionName }}
5 scriptType: pscore
6 scriptLocation: inlineScript
7 inlineScript: |
8 chmod +x ${{ variables.STAGE_SQL_BUNDLE_PATH}}/my-linux-bundle
9 ${{ variables.STAGE_SQL_BUNDLE_PATH}}/my-linux-bundle `
10 --connection 'Server=${{ variables.STAGE_SQL_SERVER }};Database=${{ variables.STAGE_SQL_DBNAME }};Authentication=Active Directory Default;Command Timeout=600'
Related articles

Dec 05, 2025 · 5 min read
IMemoryCache Entry Invalidation (Manual Cache Busting)
IMemoryCache is great for speeding up expensive operations (database reads, HTTP calls, heavy computations). But many real systems need more …

Nov 08, 2025 · 8 min read
.NET 10 Release: What's New (LTS) and What to Upgrade First
.NET 10 is the next Long-Term Support (LTS) release in the .NET family. LTS matters because it’s the version many teams standardize on …

Sep 24, 2025 · 9 min read
Automatically discover tools for Azure OpenAI Realtime API
Azure now provides a unified Realtime API for low‑latency, multimodal conversations over WebRTC or WebSockets. If you’ve used the earlier …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.

Comments