This issue is identical to the one found in: http://razorgenerator.codeplex.com/workitem/55
I am new to codeplex, so I didn't know if I should add a new issue or not (because the original one is marked as fixed)
Everytime I hit refresh, I am getting the error:
"Value cannot be null.
Parameter name: view"
I am using:
RazorGenerator.Mvc
version: 1.3.2.0
size: 13.5 KB
date modified: 11/28/2012 8:44pm
This is happening upon Refresh (F5) when the project is in Release mode and web.config Debug is set to false.
Comments: To expand on my comment: I have a few assemblies that share partial views from another assembly. I use the following to configure the assemblies to find the precompiled views: var engine = new CompositePrecompiledMvcEngine( PrecompiledViewAssembly.OfType<SharedAssembly>(HttpContext.Current.IsDebuggingEnabled), PrecompiledViewAssembly.OfType<AssemblyA>(HttpContext.Current.IsDebuggingEnabled)); ViewEngines.Engines.Insert(0, engine); VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); Browsing to a web page that uses a partial view from the shared assembly will only load once. The second time I will get the error that has been reported here and in the other thread. Going through the source code I noticed that the ViewLocationCache is not being overwritten from the default MVC one in the CompositePrecompiledMvcEngine. I guess that's probably where the problem lies. A custom location cache class would probably be needed to deal with multiple assemblies. I have been able to work around this issue by creating regular PrecompiledMvcEngines for each of the assemblies (not the shared one) then creating composites that are inserted after the PrecompiledMvcEngines in the MVC view engine list.
I am new to codeplex, so I didn't know if I should add a new issue or not (because the original one is marked as fixed)
Everytime I hit refresh, I am getting the error:
"Value cannot be null.
Parameter name: view"
I am using:
RazorGenerator.Mvc
version: 1.3.2.0
size: 13.5 KB
date modified: 11/28/2012 8:44pm
This is happening upon Refresh (F5) when the project is in Release mode and web.config Debug is set to false.
Comments: To expand on my comment: I have a few assemblies that share partial views from another assembly. I use the following to configure the assemblies to find the precompiled views: var engine = new CompositePrecompiledMvcEngine( PrecompiledViewAssembly.OfType<SharedAssembly>(HttpContext.Current.IsDebuggingEnabled), PrecompiledViewAssembly.OfType<AssemblyA>(HttpContext.Current.IsDebuggingEnabled)); ViewEngines.Engines.Insert(0, engine); VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); Browsing to a web page that uses a partial view from the shared assembly will only load once. The second time I will get the error that has been reported here and in the other thread. Going through the source code I noticed that the ViewLocationCache is not being overwritten from the default MVC one in the CompositePrecompiledMvcEngine. I guess that's probably where the problem lies. A custom location cache class would probably be needed to deal with multiple assemblies. I have been able to work around this issue by creating regular PrecompiledMvcEngines for each of the assemblies (not the shared one) then creating composites that are inserted after the PrecompiledMvcEngines in the MVC view engine list.