Search code examples
asp.netasp.net-mvcorchardcmsorchardcms-1.8orchard-modules

Module from 1.8 not working in 1.8.1 The type or namespace name 'Orchard' could not be found


I created my module in Orchard 1.8 and when installing it in orchard 1.8.1 I get an error:

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 'Orchard' could not be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 89:                 <add namespace="System.Web.Routing"/>
Line 90:                 <add namespace="System.Web.WebPages"/>
Line 91:                 <add namespace="Orchard.Mvc.Html"/>
Line 92:             </namespaces>
Line 93:         </pages>

The error is coused by an ajax call. I have checked that I am using the same jquery that in the previous version. Any ideas why this would happpen?


Solution

  • I found the mistake. It was in web.config since I am running webapi in the same application pool I had to add So that webapi doesent inherit from Orchard. So the problem was not in the version at all.