Build errors after view modifications


Almost every time I modify a view, I see the errors below on build. If I delete the obj > CodeGen folder and rebuild, the error goes away. I'm using MVC

Could not precompile the file '\Views\Shared\Licence_Licence.cshtml'. Ensure that a generator declaration exists in the cshtml file
A generator declaration is the first line of your cshtml file and looks like this:
@* Generator: MvcHelper *@
Valid host names: MvcHelper, MvcView, Template, WebPagesHelper, WebPage, RazorGenerator.Core.IHostProvider


davidebbo wrote Feb 10, 2015 at 4:26 PM

Do you have a repro?

jimmynielsen wrote Apr 14, 2015 at 1:52 PM

I'm having the exact same issue in VS2012.

Works fine in VS2013, but I need it to work in VS2012.

The issue started after I updated to version 1.7.0, previous version worked fine.

jimmynielsen wrote Apr 14, 2015 at 2:02 PM

Oh - just saw that I didn't update the extension in VS2013. That may be the reason that it's still working :)