Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MvcBuildViews doesn't do anything

I'm using the standard instructions to compile views at design time, by adding this to my vbproj file:

<MvcBuildViews>true</MvcBuildViews>

But it doesn't seem to do anything. I added a compilation error to a vbhtml file and compiled the app. If the file is open in Visual Studio, I get the compilation error whether MvcBuildViews is true or false. If the file is closed, I don't get the error, even on full build, even when MvcBuildViews is true.

This is VS2012, and I've added the MvcBuildViews entry to every single PropertyGroup in my project file, but still no luck.

What am I doing wrong here?

Update: I just upgraded to VS2013 and I still have the problem.

like image 823
Joshua Frank Avatar asked Apr 16 '14 17:04

Joshua Frank


1 Answers

To be honest I gave up to MvcBuildViews and did a job using RazorGenerator

https://github.com/RazorGenerator/RazorGenerator

  1. Install it from nuget
  2. Install an Razor Generator extension in your Visual Studio. (Tools -> Extensions and Updates -> Online Tab -> Search For Razor Generator and install
  3. Right Click your view -> Click Properties -> Make sure Custom Tool says RazorGenerator

enter image description here

like image 182
Michael Samteladze Avatar answered Nov 03 '22 14:11

Michael Samteladze