Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error CS0246 The type or namespace name 'ErrorModel' could not be found (are you missing a using directive or an assembly reference?)

Hi I am facing following error while building an MVC core application.

Severity Code Description Project Line Suppression State File Error CS0246 The type or namespace name 'ErrorModel' could not be found (are you missing a using directive or an assembly reference?) JSViewer_Angular(Core) 86 Active C:\Users\user\Desktop\JSViewer_Angular(Core)\obj\Debug\net462\Razor\Pages\Error.g.cshtml.cs

Any ideas behind this error.

like image 953
Madhur Maurya Avatar asked Nov 02 '25 04:11

Madhur Maurya


1 Answers

Check your namespaces in your project. I got this when I renamed my root namespace and project file and I forgot one reference in the _ViewImports.cshtml file.

like image 171
GeniusCodeMonkey Avatar answered Nov 03 '25 22:11

GeniusCodeMonkey