Hello,
Disabling Tax providers plugin after fresh install with sample data, nopcommerce throws an unhandled exception.
An unhandled exception occurred while processing the request.
ArgumentException: An item with the same key has already been added. Key: -72e5bc6f-2c0a-4513-b593-99708b98ec8c-1
System.Collections.Generic.Dictionary<TKey, TValue>.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
Stack Query Headers
ArgumentException: An item with the same key has already been added. Key: -72e5bc6f-2c0a-4513-b593-99708b98ec8c-1
System.Collections.Generic.Dictionary<TKey, TValue>.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
System.Collections.Generic.Dictionary<TKey, TValue>.Add(TKey key, TValue value)
Nop.Services.Plugins.PluginManager<TPlugin>.LoadPluginBySystemName(string systemName, Customer customer, int storeId) in PluginManager.cs
_plugins.Add(key, new List<TPlugin> { pluginBySystemName });
Nop.Services.Plugins.PluginManager<TPlugin>.LoadPrimaryPlugin(string systemName, Customer customer, int storeId) in PluginManager.cs
var plugin = LoadPluginBySystemName(systemName, customer, storeId)
Nop.Services.Tax.TaxPluginManager.LoadPrimaryPlugin(Customer customer, int storeId) in TaxPluginManager.cs
return LoadPrimaryPlugin(_taxSettings.ActiveTaxProviderSystemName, customer, storeId);
Nop.Services.Tax.TaxService.GetTaxRate(Product product, int taxCategoryId, Customer customer, decimal price, out decimal taxRate, out bool isTaxable) in TaxService.cs
var activeTaxProvider = _taxPluginManager.LoadPrimaryPlugin(customer, _storeContext.CurrentStore.Id);
Nop.Services.Tax.TaxService.GetProductPrice(Product product, int taxCategoryId, decimal price, bool includingTax, Customer customer, bool priceIncludesTax, out decimal taxRate) in TaxService.cs
GetTaxRate(product, taxCategoryId, customer, price, out taxRate, out var isTaxable);
Nop.Services.Tax.TaxService.GetProductPrice(Product product, decimal price, bool includingTax, Customer customer, out decimal taxRate) in TaxService.cs
return GetProductPrice(product, taxCategoryId, price, includingTax,
Nop.Services.Tax.TaxService.GetProductPrice(Product product, decimal price, Customer customer, out decimal taxRate) in TaxService.cs
return GetProductPrice(product, price, includingTax, customer, out taxRate);
Nop.Services.Tax.TaxService.GetProductPrice(Product product, decimal price, out decimal taxRate) in TaxService.cs
return GetProductPrice(product, price, customer, out taxRate);
Nop.Web.Factories.ProductModelFactory.PrepareSimpleProductOverviewPriceModel(Product product, ProductPriceModel priceModel) in ProductModelFactory.cs
var finalPriceWithoutDiscountBase = _taxService.GetProductPrice(product, minPossiblePriceWithoutDiscount, out _);
Nop.Web.Factories.ProductModelFactory.PrepareProductOverviewPriceModel(Product product, bool forceRedirectionAfterAddingToCart) in ProductModelFactory.cs
PrepareSimpleProductOverviewPriceModel(product, priceModel);
Nop.Web.Factories.ProductModelFactory.PrepareProductOverviewModels(IEnumerable<Product> products, bool preparePriceModel, bool preparePictureModel, Nullable<int> productThumbPictureSize, bool prepareSpecificationAttributes, bool forceRedirectionAfterAddingToCart) in ProductModelFactory.cs
model.ProductPrice = PrepareProductOverviewPriceModel(product, forceRedirectionAfterAddingToCart);
Nop.Web.Components.HomepageProductsViewComponent.Invoke(Nullable<int> productThumbPictureSize) in HomepageProducts.cs
var model = _productModelFactory.PrepareProductOverviewModels(products, true, true, productThumbPictureSize).ToList();
lambda_method(Closure , object , object[] )
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeSyncCore(ObjectMethodExecutor executor, ViewComponentContext context)
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
StackExchange.Profiling.Internal.ProfilingViewComponentInvoker.InvokeAsync(ViewComponentContext context) in ProfilingViewComponentInvoker.cs
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, object arguments)
AspNetCore.Views_Home_Index.ExecuteAsync() in Index.cshtml
@await Component.InvokeAsync("HomepageProducts")
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync<TFilter, TFilterAsync>()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
WebMarkupMin.AspNetCore2.WebMarkupMinMiddleware.Invoke(HttpContext context)
StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in MiniProfilerMiddleware.cs
Nop.Services.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) in AuthenticationMiddleware.cs
await _next(context);
Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
Nop.Services.Installation.InstallUrlMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in InstallUrlMiddleware.cs
await _next(context);
Nop.Services.Common.KeepAliveMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in KeepAliveMiddleware.cs
await _next(context);
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions+<>c.<UseNopExceptionHandler>b__1_1(HttpContext context) in ApplicationBuilderExtensions.cs
ExceptionDispatchInfo.Throw(exception);
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)