简体   繁体   中英

Database is missing in Web Deployment

I have a simple web application that I want to deploy my test environment on my local IIS. I am following the guide below.

ASP.NET Web Deployment using Visual Studio

I am stuck at the section where you have to set my database on the test environment. I can't find my default connection and the checkbox 'Update Database'. On the DbContext section, I am also not able to check the checkbox 'Execute Code First Migration ...' (screenshot below)

在此处输入图片说明 What did I do wrong? I can't any articles about this.

There has been some problem with code first migration in visual studio 2013. Please refer to this link.

I've confirmed that VS2013 Update 2 is working as described in this problem. The reason people want the below behavior is to enable code first migrations in cloud (Deployed) scenarios.

[Work Around] Here is a way to accomplish Code First Migrations without the publish profile check boxes. http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-how-to-use-code-first-migrations/

Expected Settings section of publish profile would have database settings with a checkbox that allows me to enable code first migrations

Actual Settings section of publish profile doesn't have a database section

Recreation

  1. create new windows 8.1 installation
  2. update all windows updates
  3. install vs2013 with update 2 from MSDN subscriptions web installer, selected all installation options
  4. install all updates
  5. create mobile service project from cloud project templates
  6. build
  7. add publish profile for web deploy (tried azure, import, and custom)
  8. select settings section and view available properties

You can alternately use the Package Manager Console for your migrations as described in the link above.

Also look at this similar issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM