1

Closed

Upgrade as per Blog

description

In trying to follow the Blog instructions for upgrading v1.0 to the pre-release, at the point where I am entering: Enable-Migrations in the command window I am presented with:

No context type was found in the assembly 'RandomProjectName'

It would seem there is no migration configuration installed after the Nuget upgrade?
Closed Feb 3 at 11:32 PM by mgirgin

comments

suhasj wrote Jan 20 at 4:54 PM

@javamarket: The error likely indicates that EF cannot find a class of type DbContext. Can you check if there one in the project ? Also it would be great if you can attach a sample repro and I can work with you in debugging it.

javamarket wrote Jan 20 at 5:35 PM

Thank you for the follow-up.

You should be able to reproduce this directly from VS2013. I simply follow your Blog steps, create a user in an MVC project then try to upgrade to v2preview. No other steps are taken.

suhasj wrote Jan 20 at 6:24 PM

@javamarket: I did try that but as mentioned in the article, I was still able to enable migrations on my project since ApplicationDbContext file was found in the assembly. Can you let me know the project name you choose, any additional configuration while choosing the project, for example, web api, web forms checkboxes or any other information that might help me repro this ?

javamarket wrote Jan 20 at 6:54 PM

Apologies - I thought it would update the unattached mdf if that was the status which of course it won't.