I had to make few modifications to the script in order to set the dll paths right.
Here is how it is looking now
set EfMigrationsNamespace=%Dummy.WebAPI
set EfMigrationsDllName=%Dummy.WebAPI.deps.dll
set EfMigrationsDllDepsJson=%Dummy.WebAPI.deps.json
set EfMigrationsStartupAssembly=%Dummy.Data.dll
set DllDir=%cd%
set PathToNuGetPackages=%USERPROFILE%.nuget\packages
set PathToEfDll=%PathToNuGetPackages%\microsoft.entityframeworkcore.tools\1.1.1\tools\netcoreapp1.0\ef.dll
ECHO %PathToEfDll%
dotnet exec --depsfile .%EfMigrationsDllDepsJson% --additionalprobingpath %PathToNuGetPackages% %PathToEfDll% database update --assembly .%EfMigrationsDllName% --startup-assembly .%EfMigrationsStartupAssembly% --project-dir . --content-root %DllDir% --data-dir %DllDir% --verbose --root-namespace %EfMigrationsNamespace%
However the script throws index oput of bound error which is very confusing to me. Here is the exception.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.ParseOption(Boolean isLongOption, CommandLineApplication c
ommand, String[] args, Int32& index, CommandOption& option)
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
Index was outside the bounds of the array.
Any clue to this error?