I am doing a demo project in asp.net MVC with entityframework 5.0.
I created a custom user class that inherits IdentityUser, and replaced it in the whole project after scaffolding all identity files. Now I'm having a weird problem I don't understand why is happening.
For this to work I had to add using ApplicationName.Data, where this new class file is stored, to all files. This works as intended but when I add this to _ManageNav.cshtml.g.cs, and build and run it works the first time, but then when I rebuild it removes the statement so that I have to re-add it for every build.
This is quite annoying so if anyone could shed some light on why this one file seems to be removing this using statement on every other build, that would be greatly appreciated.
After researching what these files are and closely inspecting the code, I was able to fix this issue by adding the statement to the the page file "_ManageNav.cshtml" instead. At this point this seems obvious, but the visual studio error log threw me off with this one.