This project is read-only.

library project not in reference

Nov 15, 2013 at 4:05 PM
hi,
this is the configuration

Main MVC project (webb app)

Library project mvc 1 (dll)
Library project mvc 2 (dll)
Library project mvc 3 (dll)
...

it's possible to make work razor generator without adding the Libraries project references in the Main project?

thanks
Nov 15, 2013 at 5:22 PM
Yes, I think that should work fine. In fact, my sample does this: https://github.com/davidebbo/MvcApplicationRazorGeneratorSeparateLibrary
Nov 18, 2013 at 10:17 AM
Edited Nov 18, 2013 at 10:17 AM
if you remove the reference of LibraryViewProject
from MvcApplicationRazorGeneratorSeparateLibrary project

but copy the LibraryViewProject.dll into the bin folder of the site

it give me this error (I don't want add the reference, for plugg at runtime modules ...)

thanks

The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Nov 18, 2013 at 9:08 PM
Hmmm, that's strange, because I don't think the main project is doing anything with that reference. The only purpose is to bring in the DLL in bin.

If you want to debug it, please check whether you see the App_Start logic (LibraryViewProject\App_Start\RazorGeneratorMvcStart.cs) getting called at all. Make sure that you do have WebActivatorEx in bin.
Marked as answer by comgiu on 11/18/2013 at 1:34 PM
Nov 18, 2013 at 9:33 PM
thanks that's the problem
WebActivatorEx
Nov 18, 2013 at 9:36 PM
Yeah! :)