Missing web.config after installing RazorGenerator.Mvc into class library

Feb 5, 2012 at 10:52 AM

I've following the instruction to install RazorGenerator.Mvc into a class library project as explained here:

http://blog.davidebbo.com/2011/06/precompile-your-mvc-views-using.html

However, it does not install the web.config or sample view. In fact this is the same problem as Fausto mentioned in his feedback to the above blog post - see: http://blog.davidebbo.com/2011/06/precompile-your-mvc-views-using.html?showComment=1321038081517#c6261804387933276480

Interesting, creating my own test MVC Razor view in a Views\Shared folder within this class library, and setting its Custom tool to RazorGenerator seems to work as expected - a class is generated for the test view, and this compiled MVC view is resolved when running up the main MVC project.

The question therefore is what are the implications of not having the web.config installed in the class library project?

Thanks

Christian

Coordinator
Feb 6, 2012 at 1:24 AM

Since I wrote that post, we realized that the simpler way to write a Class Library was to actually create it as an MVC project. When doing that, you don't need to add any config files. Also, the advantage of this approach is that most of the tooling works well, whereas in a Class Library project many things don't quite work.