Reputation: 581
I'm setting up migrate.exe to run DB migration during VSTS release:
migrate.exe DataAccess.dll /connectionProviderName="System.Data.SqlClient" /connectionString="Data Source=SQLXXX\DEV01;Initial Catalog=XXXXX;Integrated Security=true;" /verbose
Output:
VERBOSE: Target database is: 'XXXXX' (DataSource: SQLXXX\DEV01, Provider: System.Data.SqlClient, Origin: Explicit).
No pending explicit migrations.
Running Seed method.
System.Data.Entity.Migrations.Design.ToolingException: Object reference not set to an instance of an object.
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Console.Program.Run()
at System.Data.Entity.Migrations.Console.Program.Main(String[] args)
ERROR: Object reference not set to an instance of an object.
We have no code in Seed method. No pending explicit migrations
is expected but we need the script to finish without an error for the release process to continue. How to fix this error?
I raised this issue on EF6 GitHub
Upvotes: 0
Views: 460
Reputation: 581
To make it work I had to provide /startupConfigurationFile instead of /connectionString.
Upvotes: 1