locked
Library Package Manager - missing in VS Community 2013. RRS feed

  • Question

  • User1953081067 posted

    Hi

    I'm trying to follow the tutorial 'Using Web API 2 with Entity Framework 6'. I'm using MS Visual Studio Community 2013.

    In Part 3 'Seed the Database', the first part says:

    From the Tools menu, select Library Package Manager, then select Package Manager Console. In the Package Manager Console window, enter the following command: Enable-Migrations.

    In my VS (Community 2013), there is no Library Package Manager in the tools menu. There is NuGet Package Manager with 'Package Manager Console' which I assume is the same thing? If I enter 'Enable-Migrations', I get the following error:

    More than one context type was found in the assembly 'BookService'.
    To enable migrations for 'BookService.Models.BookServiceContext', use Enable-Migrations -ContextTypeName BookService.Models.BookServiceContext.
    To enable migrations for 'BookService.Models.ApplicationDbContext', use Enable-Migrations -ContextTypeName BookService.Models.ApplicationDbContext.

    Any thoughts?

    Thanks as always

    Sunday, April 5, 2015 3:16 PM

All replies

  • User673200084 posted

    Hi In case this has not been answered.

    1) Open Nuget Package Manager Console  Tools\Nuget Package Manager\Package Manager Console.

    2) Type in enable-migrations (press enter)  (You may get a message saying they are already enabled- thats' OK)

    3) Type in update-database (press enter).

    Now run your code and the data is there.

    Thursday, July 2, 2015 7:37 AM