I've got a Web API project created using ASP.NET Core 1.1. I use Entity Framework Core Migrations. Locally, that all works well.
However, I'm trying to use Visual Studio team services to automatically run the migrations when I do a release and can't figure out how to do this. Is there some inbuilt component, or should I try to get the dotnet ef tools installed on the agent and run it that way?
I would suggest using the dotnet ef tools (during VSTS Build) to generate a .sql script which could be used to generate or update your database wherever needed (during the Release).
dotnet ef migrations script -o migration-script.sql -i -v
During Release amongst other options you could run Invoke-SqlCmd:
Invoke-SqlCmd -inputfile "$inputFile" -serverinstance "$serverInstance" -username "$serverUserName" -password "$serverPassword" -database "$database"