DB Migration for EF

I am getting the attached error message when attempting to run a migration script below during an octopus deoployment.

This exact script is working just fine Azure DevOps any help would be greatly appreciated.

cd LittlerOnDemand.WebApi.Host.azure\bin
.\migrate.exe LittlerOnDemand.Repository.Implementation.dll /connectionString="Data Source=#{datasource};Initial Catalog=#{catalog};Integrated Security=False;User ID=#{userid};Password=#{password};Connect Timeout=60;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" /connectionProviderName="System.Data.SqlClient" /Verbose

Hi @ncase,

Thanks for getting in touch! I’m sorry to hear you’re hitting an error here. Unfortunately I don’t see an error message attached to this thread - would you be willing to paste that in? I’ll be more than happy to look into it. :slight_smile:

I look forward to hearing back and getting to the bottom of this one!

Best regards,


Hello @Kenneth_Bates,

I have attached the deployment log per your request. Please let me know if you have further questions.
This is a rather high priority issue if you could get back to me ASAP that would be great!

Thank you,
Nate Case

ServerTasks-83186.log.txt (11.7 KB)

@Kenneth_Bates Is there any update on this matter?
Nate Case

Hi Nate,

Thanks for keeping in touch, and my apologies about the delay in getting back to you on this one.

I brought this up with my team, and it looks like this script isn’t in the right working directory when attempting to be executed. This is due to the fact that your package is unpacking in one directory and the script is attempting to be run in another one, since it’s run a separate step. To solve this you can add the package to your script step to guarantee it’ll be in the same location.

Could you let me know if that fixes the issue for you, or if you just have any other questions going forward? :slight_smile:

Best regards,