I have seen a few questions on SO about a similar error when deploying a website, but I seem to randomly get this error when building an ASP.NET MVC website in
You can safely put this target build at the end of your .csproj file and leave MvcBuildViews to true.
MvcBuildViews
true
It deletes the obj folder before starting the build...