plugin already defined error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi there,
can someone tell me that how to resolve that error
Exception: A plugin with 'CurrencyExchange.ECB' system name is already defined
Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in ApplicationPartManagerExtensions.cs, line 482
it is creating multiple copies of different plugins so, when i try to remove one plugin error then error comes again with new plugins. I am not able to find that which programming file is creating issue of making copies.
Thanks for any help you can give on development,
Best Regards,
huma jaffri
4 years ago
This is a a common error - refer to https://github.com/nopSolutions/nopCommerce/commit/7b9f8f0fb6178c40b92167ebdaa049a21a47b1ee

One of the plugin directories will have /plugin directory inside both development and production
As per the above link you need to update the Nop.Web build file with code
I replaced
  <ItemGroup>
    <Folder Include="Plugins\" />
  </ItemGroup>
with
  <ItemGroup>
    <!-- This setting fixes the problem caused by this update in the websdk in vs2019
    https://github.com/aspnet/websdk/commit/7e6b193ddcf1eec5c0a88a9748c626775555273e#diff-edf5a48ed0d4aa5a4289cb857bf46a04
    Therefore, we restore the standard configuration behavior (there was no copy to the output directory)
    in order to avoid the "Duplicate dll" error during publication.
    We can also use “ExcludeConfigFilesFromBuildOutput” according to https://github.com/aspnet/AspNetCore/issues/14017 -->
    <Content Update="**\*.config;**\*.json" CopyToOutputDirectory="Never" CopyToPublishDirectory="PreserveNewest" />
  </ItemGroup>

Then delete all the plugins in the src\Presentation\Nop.Web\Plugins directory
Clean the project and rebuild
3 years ago
Works for me too - thanks. nop Version 4.20
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.