I am trying to create some ASP.net 5 MVC Web Application using VS 2015 CE. I am always getting error with DNX Core and DNX 4.5 as not being referenced to the project.
I tried changing the project.json file by removing entries in "frameworks" section and keeping only one at a time from both "dnx451" and "dnxcore50", still no luck.
I ended up with the large list of compile time error primarily because of the following error.
CS1061 'ApplicationDbContext' does not contain a definition for 'Database' and no extension method 'Database' accepting a first argument of type 'ApplicationDbContext' could be found (are you missing a using directive or an assembly reference?) DemoApp.DNX 4.5.1
and on the same lines
CS1061 'ApplicationDbContext' does not contain a definition for 'Database' and no extension method 'Database' accepting a first argument of type 'ApplicationDbContext' could be found (are you missing a using directive or an assembly reference?) DemoApp.DNX Core 5.0
Tried using 'Restore Packages' command as well but nothing happens.
I dropped the project and re-created, however same things happened again. As far as I know it worked before and now I don't know what went wrong all of the sudden.
ApplicationDbContext
defined in project - if so please can you add code – James P