Open drmcclelland opened 9 years ago
Same probleme here. My first try to handle missing usings in the razor views are:
public RazorNamespaceRegister(IEnumerable
It is a class I called from the MefConfig.cs like this: new RazorNamespaceRegister(assemblies); But still don't work because the usings or assembly reference still not found.
Possibly, a small step in the right direction.
so long.
I tried modifying Index.cshtml in the Client1.Page project to use a strongly-typed mode, but I get an error. If you have any ideas of how to implement this, I'd appreciate it.
First off, here are the modifications I made:
Model:
View:
Controller action:
Here is the error I receive:
Server Error in '/' Application.
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'model' does not exist in the current context
Source Error:
Line 42: BeginContext("~/Plugins/Client1.Page/Views/Test/Index.cshtml", 150, 5, false); Line 43: Line 44: Write(model); Line 45: Line 46: EndContext("~/Plugins/Client1.Page/Views/Test/Index.cshtml", 150, 5, false);
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f947cd85\71552e5a\App_Web_index.cshtml.dd1163fa.itk9ur2d.0.cs Line: 44