I'm trying to deploy an application to my webserver and everything works, except that it does not update the remote database.
With a new demo MVC project you have the option "Update database" when publishing For some reason that options is not available when I want to publish my own MVC project.
Why is this option not showing?
- I am using EF (database first)
- I am getting a warning under the connectionstring fields: in order to publish a code first model you must enable EF code first migrations. (although this project should not use code first)
- Web Deploy 3.0 and the dbDacFx provider are installed on the server
-- EDIT -- I have now recreated the project, and the update database keeps showing until the first web publish. then it just disappears and shows the warning in order to publish a code first model you must enable EF code first migrations. (although im not using code first, im using database first) Is this a bug in VS or what am I doing wrong?
--FIX--
I got it working by adding another connection string pointing to my database (without EF interference) in web.config: <add name="DeployCode" connectionString="Data Source=(localdb)\Projects;Initial Catalog=xxxxx;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;" providerName="System.Data.SqlClient" />