I am trying to use migrate.exe in my work project and i'm getting the following error.
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at System.Data.Entity.Migrations.Console.Program.Main(String[] args)
The Command:
d:\Publish\bin>migrate.exe Example.Data.dll /connectionProviderName:"System.Data.SqlClient" /connectionString: "Data Source=(local);Initial Catalog=ExampleDb;Integrated Security=SSPI;MultipleActiveResultSets=true"
The migrate.exe and the migrate.exe.config file are kept in the bin folder of the Publish while executing this command.
I have gone through this stackoverflow question and also this msdn link but am not able to figure out what is missing.
I created a test console project and was able to execute the process successfully with similar configurations except that instead of dll it was an exe.
Any help appreciated. Thank You.