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
I answered a similar question recently, and this looks like it might be related.
To summarize, I ran into this in one of our MVC projects, and it was due to having the MvcBuildViews
property in the project file set to true
. Setting the property to false
fixed the problem.
false
I also found this answer which outlines an alternative that does not require turning off view building.