I hope someone can point me in the right direction as to what the problem may be with the following server error.
A little background, I am playing around with developing a plugin.
Nop Version 3.00
The plugin builds fine in VS2012 the solution builds fine as well no errors at all, and the plugin runs fine it does everything that is expected, with no errors or exceptions.
I build the solution and run the deploy.bat which runs fine no error or exceptions, I then get the plugin from the deployable folder and place it in the plugin folder of my test nop commerce website, running on a separate development server from the machine that I use to develop code,
The plugin installs fine no error or exception.
Now to the problem, when I run the the site and try and view the page the plugin widget zone is on I get the following exception
Server Error in '/' Application.
Method not found: 'System.Collections.Generic.IList`1<Nop.Core.Domain.Orders.BestsellersReportLine> Nop.Services.Orders.IOrderReportService.BestSellersReport(Int32, Int32, System.Nullable`1<System.DateTime>, System.Nullable`1<System.DateTime>, System.Nullable`1<Nop.Core.Domain.Orders.OrderStatus>, System.Nullable`1<Nop.Core.Domain.Payments.PaymentStatus>, System.Nullable`1<Nop.Core.Domain.Shipping.ShippingStatus>, Int32, Int32, Int32, Int32, Boolean)'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<Nop.Core.Domain.Orders.BestsellersReportLine> Nop.Services.Orders.IOrderReportService.BestSellersReport(Int32, Int32, System.Nullable`1<System.DateTime>, System.Nullable`1<System.DateTime>, System.Nullable`1<Nop.Core.Domain.Orders.OrderStatus>, System.Nullable`1<Nop.Core.Domain.Payments.PaymentStatus>, System.Nullable`1<Nop.Core.Domain.Shipping.ShippingStatus>, Int32, Int32, Int32, Int32, Boolean)'.
I am trying to display the Bestseller products in my plugin and I have used the following piece of code in my plugin
if (_catalogSettings.ShowBestsellersOnHomepage && _catalogSettings.NumberOfBestsellersOnHomepage > 0)
{
//load and cache report
var report = _cacheManager.Get(string.Format(ModelCacheEventConsumer.HOMEPAGE_BESTSELLERS_IDS_KEY, _storeContext.CurrentStore.Id),
() =>
//group by products (not product variants)
_orderReportService.BestSellersReport(storeId: _storeContext.CurrentStore.Id,
recordsToReturn: _catalogSettings.NumberOfBestsellersOnHomepage,
groupBy: 2));
//load products
products = _productService.GetProductsByIds(report.Select(x => x.EntityId).ToArray());
//ACL and store mapping
products = products.Where(p => _aclService.Authorize(p) && _storeMappingService.Authorize(p)).ToList();
}
As I say this plugin compiles and runs fine in VS2012 but I get the above exception when I try and run it on a website
Thanks