Looking for tips from anyone who has experience deploying to Azure.
I'm trying from just the raw application, without any customizations or modifications. It's working locally in a development environment. I use the Publish menu from the *.Web.Mvc project.
I can push it successfully to my Azure account.
Once I have everything connected and configured properly on Azure, I fire up the application and I get the "No language defined in this application" message that I would expect from an un-migrated instance.
Now I'm stuck.
There is no option to apply migrations with the Publish from Visual Studio 2017.
I can't apply it remotely from the Package-Manager Console. I get "The EntityFramework package is not installed on project '*.EntityFramework.'"
And I can't do it from the console in Azure. I run dotnet ef database update (or really any dotnet ef command) and I get "Unhandled Exception. Value cannot be null. Parameter name: Path."
So I don't have a way to migrate the database.
I'm not using a virtual machine, so I don't think I can just push Migrator out there.
I'm really trying to come up to speed on Azure. So I might just be missing something obvious.
Any ideas?
4 Answer(s)
-
0
For Azure, create a blank database first through the Portal.
Then, inside the AspNetZero solution, under tools, there is a Migrator project. Change the connection string within that project to point to your Azure DB, run it.
Hope that helps a little.
-
0
Thanks @JeffMH :). We do it this way as well.
-
0
Brilliant! Works great! Thank you so much!
ASP.NET Zero is a great framework. But the community is equally great.
For any one reading this message later, make sure you authorize your client IP address to Azure SQL Database before you do this.
-
0
Thanks @Sh0knah :)