My view has errors. I see these errors only if I open the view in Visual Studio.
I would like to see the errors on compile time rather than on execute time.
Does exist a way to obtain this behavior?
You can update by hand the .csproj file and add a <MvcBuildViews>true</MvcBuildViews>
that will compile the views as you go.
Here's a link I googled, you'll find others as well.
EDIT: If it's too slow try setting the build only for Release, edit the csproj file doing something like this; see the docs for AspNetCompiler for more details.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
-->
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
<AspNetCompiler VirtualPath="Temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
</Target>
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