I have a Asp.Net MVC 4 View (Razor), which includes a model like below:
@model Project.Models.TestModel
The problem is that if I go the project, and rename TestModel
to TestModel2
, and I click on rebuild project, no errors are given. If I open up the .cshtml
file directly, then I do get the error there.
Can you enforce such errors to be given immediately at compile time?
Open *.Web.csproj file and change this:
<MvcBuildViews>false</MvcBuildViews>
to true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With