Create Projection on 1.4/wAzure generate a Error

Topics: Administration, Troubleshooting
Mar 18, 2012 at 6:56 PM

Hi,

If i try to create a Projection i get a error on a default 1.4 on Azure Deployment:

  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: CS0246: The type or namespace name 'ProjectionPartEditViewModel' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Server Error in '/' Application.

Compilation Error

 

 
Line 28:     
Line 29:     
Line 30:     public class _Page_Modules_Orchard_Projections_Views_EditorTemplates_Parts_ProjectionPart_cshtml : Orchard.Mvc.ViewEngines.Razor.WebViewPage<ProjectionPartEditViewModel> {
Line 31:         
Line 32: #line hidden


Source File: d:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\658c9fe4\9ba79c2e\App_Web_projectionpart.cshtml.8041e858.yogvvaae.0.cs Line: 30

Any Tips?

Regards

Markus

Mar 21, 2012 at 2:46 AM

I don't have a fix, but I tried it on my Azure deployment and I can confirm that I get exactly the same error. I also get a similar error if I try to go to Queries, so both of these Admins are broken:

/Admin/Contents/Create/ProjectionPage

/Admin/Projector

The error I get for the Queries admin is:

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: CS0246: The type or namespace name 'AdminIndexViewModel' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

 
Line 29:     
Line 30:     
Line 31:     public class _Page_Modules_Orchard_Projections_Views_admin_index_cshtml : Orchard.Mvc.ViewEngines.Razor.WebViewPage<AdminIndexViewModel> {
Line 32:         
Line 33: #line hidden


Source File: d:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\51d07ae0\97a69c2e\App_Web_index.cshtml.e6eaacdb.-uqiwxsk.0.cs    Line: 31 

Apr 3, 2012 at 6:58 PM

This can be resolved by adding

@using Orchard.Projections.ViewModels;


to the views that use models from the ViewModels folder.

Apr 4, 2012 at 5:02 AM

Thanks Linden, I can confirm that fixed the problem for me. In fact I got the latest source and Sebastien has fixed this in rev 6086 so I didn't even need to make the changes myself - Thanks Sebastien  :-)