I recently added MVC Foolproof Validation to a new MVC4 app, and now every time I try and scaffold a view using the Add View wizard, I get the following exception [shortened for brevity]:
C:\Projects2012\Comair.RI\Comair.RI.UI\CodeTemplates\AddView\CSHTML\Details.tt(0,0) : error : Running transformation: System.TypeInitializationException: The type initializer for 'Foolproof.ContingentValidationAttribute' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
NOTE: I have found simply commenting out the Foolproof attributes in the view model, and then rcompiling, allows the scaffolding to work again. Then I can uncomment the Foolproof stuff and it seems to work.