vs2013, EF6.0.0.0 using migrations to update the database times wrong

Source: Internet
Author: User

1, VS, Package Manager console

2, implementation,enable-migrations

Error:

Migrations has already been enabled in project ' DD '. To overwrite the existing migrations configuration with use The-force parameter.

3, implementation,enable-migrations -force

Error:

The Migrations configuration type ' DD. Configuration ' is not being found in the assembly ' DD '.

Reason:

When executing this command, the program will first go to the local GAC directory assembly to find the configuration file, if the previous deployment of the program does not contain the config, then the above error will occur. Of course, there are other solutions available on the Web, but the methods found do not apply to my situation.

4, delete the GAC directory corresponding to the assembly (or cut into other folders), execute again,enable-migrations -force, found can. :)

vs2013, EF6.0.0.0 using migrations to update the database times wrong

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.