Help! System.Exception A plugin with 'SevenSpikes.Nop.Plugins.CategoriesHeaderMenu' system name is already defined

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 năm cách đây
Eyre wrote:
sina.islam
4. If you take reference one plugin from another make sure that it is not copied to the referred plugin folder.


I am experiencing this problem. How do you ensure that it is not copying?


Did you try to set copy local "No" after adding the plugin as a reference? If not work then you can check ClearPluginAssemblies.proj and modify it or create your own(suppose YourPluginClearPluginAssemblies.proj). Then change the MSBuild Projects reference of your plugin by Editing Project file (yourplugin.csproj). If none of the above work then delete it manually when deploying to production but do not keep the same .dlls to multiple paths.
4 năm cách đây
sina.islam wrote:
sina.islam
4. If you take reference one plugin from another make sure that it is not copied to the referred plugin folder.


I am experiencing this problem. How do you ensure that it is not copying?

Did you try to set copy local "No" after adding the plugin as a reference? If not work then you can check ClearPluginAssemblies.proj and modify it or create your own(suppose YourPluginClearPluginAssemblies.proj). Then change the MSBuild Projects reference of your plugin by Editing Project file (yourplugin.csproj). If none of the above work then delete it manually when deploying to production but do not keep the same .dlls to multiple paths.


Well, after further inspection the following:


  <!-- This target execute after "Build" target -->
  <Target Name="NopTarget" AfterTargets="Build">
    <!-- Delete unnecessary libraries from plugins path -->
    <MSBuild Projects="$(MSBuildProjectDirectory)\..\..\Build\ClearPluginAssemblies.proj" Properties="PluginPath=$(MSBuildProjectDirectory)\$(OutDir)" Targets="NopClear" />
  </Target>


was missing from the plugin .csproj file. Thank you
4 năm cách đây
I had similar issue, but it was related to VS 2019 & .NET Core 3.0 installed on my computer. Check https://github.com/nopSolutions/nopCommerce/commit/7b9f8f0fb6178c40b92167ebdaa049a21a47b1ee change for the details how to fix it. The solution worked very well in my case.
4 năm cách đây
ilich_x86 wrote:
I had similar issue, but it was related to VS 2019 & .NET Core 3.0 installed on my computer. Check https://github.com/nopSolutions/nopCommerce/commit/7b9f8f0fb6178c40b92167ebdaa049a21a47b1ee change for the details how to fix it. The solution worked very well in my case.


This is actually the fix to my problem (also using VS2019 and  .NET Core 3.0)

Thank you ilich
4 năm cách đây
ilich_x86 wrote:
I had similar issue, but it was related to VS 2019 & .NET Core 3.0 installed on my computer. Check https://github.com/nopSolutions/nopCommerce/commit/7b9f8f0fb6178c40b92167ebdaa049a21a47b1ee change for the details how to fix it. The solution worked very well in my case.


Oh man... good catch. That's the ticket. Thanks!
4 năm cách đây
I have the same problem with a completely fresh install of NC4.2.  I tried the solution (creating the json file), with no luck.  The error (now) is
Exception: A plugin with 'Payments.CashOnDelivery' system name is already defined
What version of VS2019 are you using?
This is a friggin' nightmare!  Is there a newer build of NC4.2 out that is compatible w/the latest VS2019?  
I just don't get why, now, the build works, I run it, then get errors again - makes zero sense.

UPDATE: Added the settings to the csproj file (with NO LUCK)
https://github.com/nopSolutions/nopCommerce/commit/7b9f8f0fb6178c40b92167ebdaa049a21a47b1ee
Any other tricks?


UPDATE2: Rebooting the computer. Re-cleaning (for the 25th time) and rebuilding (for the 25th time), and now it, magically, works.  Go figure!  (2 solid days of hair pulling over other people's bugs)
4 năm cách đây
I am having this same problem.

I downloaded a fresh copy of 4.2. Got it configured and good to go in an Azure App Service. All was fine.

I wanted to test out my ability to make changes to the code, and publish them, etc. So I pulled the code down to my local dev machine. I edited the config files necessary to point it at my dev database and dev azure blob instance. Ran it locally and it works great.

However, I then setup automated builds in Azure via CI... and whenever I deploy it to my azure app service, I get this whole "plugin is already defined" nightmare. I have read every discussion on this problem and I can't seem to figure if I should just turn off the UsPluginsShadowCopy altogether or what. Is there a single, consistent method for fixing this when running in azure app services?
4 năm cách đây
If you're working in Visual Studio, make sure you close IIS when clean/build. It sucks but it works for me.
4 năm cách đây
Eyre wrote:
If you're working in Visual Studio, make sure you close IIS when clean/build. It sucks but it works for me.


Sometimes I just blow everything away. I have the follow BAT file set to run anytime my computer is restarted just to avoid anything that might have been cached and not released.


ECHO OFF
ECHO ---------------------------------
ECHO Start Visual Studio Cleanup Tasks
ECHO ---------------------------------

ECHO ---------------------------------
ECHO Clear AppData
ECHO ---------------------------------
del C:\Users\pspoerry\AppData\Local\Microsoft\VisualStudio\16.0_2baf98fa\ComponentModelCache\*.* /s /q
del C:\Users\pspoerry\AppData\Local\Temp\*.* /s /q

ECHO ---------------------------------
ECHO Whack the bin and obj subitems
ECHO ---------------------------------
REM coiuld also delete the one from Build, Libraries, Plugins, etc.
del C:\Users\pspoerry\source\repos\nop\Presentation\Nop.Web\bin\*.* /s /q
del C:\Users\pspoerry\source\repos\nop\Presentation\Nop.Web\obj\*.* /s /q
del C:\Users\pspoerry\source\repos\nop\Presentation\Nop.Web.Framework\bin\*.* /s /q
del C:\Users\pspoerry\source\repos\nop\Presentation\Nop.Web.Framework\obj\*.* /s /q

REM       C:\Users\pspoerry\source\repos\nop\Presentation\Nop.Web\bin
REM       C:\Users\pspoerry\source\repos\nop\Presentation\Nop.Web\obj

REM could also delete the .vs folders from the other project dirs
ECHO ---------------------------------
ECHO Clean repository directory
ECHO ---------------------------------
del C:\Users\pspoerry\source\repos\nop\.vs\NopCommerce\*.* /s /q

ECHO ---------------------------------
ECHO End Visual Studio Cleanup Tasks
ECHO ---------------------------------
ECHO ON
3 năm cách đây
ethan_hunt88 wrote:
I had the same problem when I downloaded the 4.20 source code and run it for the first time.
The problem was resolved after deleting everything contained within the following folder $\nop\Presentation\Nop.Web\Plugins\?


This worked for me, thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.