Nopcommerce inherit code from de nop core controll

2019-08-12 02:20发布

问题:

I'm trying to develop a plugin in nopcommerce. To do this I want to replace some of the core code out of nopcommerce.

I tried to inherit it via:

public class TryingNewProjectController : BasePluginController, Nop.Web.Controllers.CatalogController
{
   ///// CODE /////  
}

Can someone tell me what I'm doing wrong ?

Error:

The type or namespace name 'Controllers' does not exist in the namespace 'Nop.Web' (are you missing an assembly reference?

回答1:

It really does mean you are actually missing a reference to be able to use Nop.Web.Controllers.

And as you found out it was Web.Controllers.CatalogController.

So Nop.Web.Controllers was itself expecting the reference.