We have a ASP.NET MVC with 4-5 different build configurations. Whenever we change the build configuration, we need to delete the obj folder for the web project, since we get
Cleaning the solution (Right click Solution in VS, clean), worked for me.