Migrate.exe is complicated to get working. Here are the steps you need to follow to get it to work in all configurations:
• Copy migrate.exe into the same directory as your application binaries
• Always specify the /startupDirectory and /startupConfirgurationFile parameters
• If your app is .NET 4 then you need to copy Redirect.config from the tools folder and rename it to migrate.exe.config
You can't just call 'migrate.exe /?' from the tools folder because it needs EntityFramework.dll to get the help resources.
Comments: Noticed that when migrate.exe is not in the same directory as your binaries you get a cryptic exception: System.Data.Entity.Migrations.Design.ToolingException: Could not load file or assembly '..\\..\\..\\..\\binaries\\AnyCPU\\Debug\\Microsoft.InfoCat.Services.Provisioning' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner) at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMig ration, Boolean force) at System.Data.Entity.Migrations.Console.Program.Run() at System.Data.Entity.Migrations.Console.Program.Main(String[] args) ERROR: Could not load file or assembly '..\\..\\..\\..\\binaries\\AnyCPU\\Debug\\Microsoft.InfoCat.Services.Provisioning' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
• Copy migrate.exe into the same directory as your application binaries
• Always specify the /startupDirectory and /startupConfirgurationFile parameters
• If your app is .NET 4 then you need to copy Redirect.config from the tools folder and rename it to migrate.exe.config
You can't just call 'migrate.exe /?' from the tools folder because it needs EntityFramework.dll to get the help resources.
Comments: Noticed that when migrate.exe is not in the same directory as your binaries you get a cryptic exception: System.Data.Entity.Migrations.Design.ToolingException: Could not load file or assembly '..\\..\\..\\..\\binaries\\AnyCPU\\Debug\\Microsoft.InfoCat.Services.Provisioning' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner) at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMig ration, Boolean force) at System.Data.Entity.Migrations.Console.Program.Run() at System.Data.Entity.Migrations.Console.Program.Main(String[] args) ERROR: Could not load file or assembly '..\\..\\..\\..\\binaries\\AnyCPU\\Debug\\Microsoft.InfoCat.Services.Provisioning' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)