Hi guys,

i'm using the new version 3.9 of nopcommerce and i have made some customization in the logic.

I have modified the Nop.Web/Models/CategoryModel

1. in the constructor public CategoryModel() -> Add: AvailableManufacturers = new List<SelectListItem>();

2. in the class -> public IList<SelectListItem> AvailableManufacturers { get; set; }

3. So i have modified in my template:
Views/Catalog/CategoryTemplate.ProductsInGridOrLines

i have added the following:

@Html.DropDownList("Manufacturer", Model.AvailableManufacturers, new { onchange = "setLocation(this.value);", Class = "input form-control manuf-filter" })


because i want to use manufacturers as filter.

I have also modify : Nop.WebControllers/CatalogController -> ActionResult Category

using a new method from the CatalogModelFactory: PrepareCategoryModelManufacturers passing as parameter the Manufacturer ID.

4. And finally, i have modified the Nop.Web/Factories/CatalogModelFactory with my new method.

All working great in dev mode (Vs 15), and also working in the release mode, until the case of "restart application", or if i need to update a view, or css file. Then i've got the following error in production:

Views\Catalog\CategoryTemplate.ProductsInGridOrLines.cshtml(193): error CS1061: 'Nop.Web.Models.Catalog.CategoryModel' does not contain a definition for 'AvailableManufacturers' and no extension method 'AvailableManufacturers' accepting a first argument of type 'Nop.Web.Models.Catalog.CategoryModel' could be found (are you missing a using directive or an assembly reference?)

System.Web.HttpCompileException (0x80004005): \Views\Catalog\CategoryTemplate.ProductsInGridOrLines.cshtml(193): error CS1061: 'Nop.Web.Models.Catalog.CategoryModel' does not contain a definition for 'AvailableManufacturers' and no extension method 'AvailableManufacturers' accepting a first argument of type 'Nop.Web.Models.Catalog.CategoryModel' could be found (are you missing a using directive or an assembly reference?).....

but there is method in the Category model....

Please inform me why, this is happening??