Robert Ross Robert Ross - 13 days ago 5
C# Question

Error in project after changing field in the model Entity Framework

First, I added an extra field to my project, then I typed

Enable-Migrations
in the console, which executed successfully, then I typed
add-migration
myprojectname
. The last step was
Update-Database
and after this step I got
The project 'class_project' failed to build.` in the console.

The error is :


Severity Code Description Project File Line Suppression State

Error CS0426 The type name 'Models' does not exist in the type 'class_project' class_project C:\Users\internship\documents\visual studio 2015\Projects\class_project\class_project\Migrations\Configuration.cs 16 Active


I really have no idea why am I getting this, since i followed some clear instructions.

Can someone help, please?

Answer

The answer is in the error you will get when you try to build the project.