FluentMigrator not running migrations

I was getting the same thing, and it turned out to be that the assembly with the migrations in it had been written using version, let's say, 1.x, and I was running them with the Migrate.exe from version 2.x.

Using the Migrate.exe with the same version that was used to build the migrations DLL solved it for me.


I had a similar issue where I was running the migrate.exefrom a command prompt to test my first migration to see how it worked.

I found my issue was that I had added Migrator Tags as documented here to the top of the InitialMigration class

[Tags("Localhost","Development","Test","Production")] // Added these
public class InitialMigration : Migration
{
  // Migration here
}

When I ran the command from a command prompt I missed out the --tag parameter in the command so this command:

migrate.exe --conn="Server=.;Database=my_db;Trusted_Connection=True;Encrypt=True;Connection Timeout=30;" --provider=SqlServer --assembly="MyMigrations.dll" --task=migrate --output --outputFilename="src\migrated.sql"

should have been this:

migrate.exe --conn="Server=.;Database=my_db;Trusted_Connection=True;Encrypt=True;Connection Timeout=30;" --provider=SqlServer --assembly="MyMigrations.dll" --tag="localhost" --task=migrate --output --outputFilename="src\migrated.sql"

NOTE: The --tag parameter missing in the first script.