Publishing nopCommerce 4.2 via Visual Studio 2019

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi everyone,

I am new to nopCommerce. I install nopCommerce 4.2 source code version in my computer, its working fine. When I publish via Visual Studio 2019, its published successfully but giving error. I guessed something wrong with plugin.
Hope anyone can help.

url redirected to install but giving following error.

This page isn’t working

xwarriorgames-001-site4.ftempurl.com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

I found a long error message in stdout.
Sample std out message
Application startup exception: System.Exception: A plugin with 'CurrencyExchange.ECB' system name is already defined
---> System.Exception: A plugin with 'CurrencyExchange.ECB' system name is already defined
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\Users\santinaj\source\repos\LocalStore\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 475
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, NopConfig config) in C:\Users\santinaj\source\repos\LocalStore\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationPartManagerExtensions.cs:line 579
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, IConfiguration configuration, IHostingEnvironment hostingEnvironment) in C:\Users\santinaj\source\repos\LocalStore\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ServiceCollectionExtensions.cs:line 82
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
      Application startup exception

Thank You in Advance
4 years ago
Go to database and execute this query
update Store set SslEnabled = 0
Restart application.
Clean browser cache.

If still having the issue, mention it here.
4 years ago
RE:  " System.Exception: A plugin with 'CurrencyExchange.ECB' system name is already defined"

Make sure you do not have multiple copies of the Nop.Plugin.ExchangeRate.EcbExchange.dll  file in subfolders of \Plugins
4 years ago
@Go to database and execute this query
update Store set SslEnabled = 0
Restart application.
Clean browser cache.

If still having the issue, mention it here.

Thank You for reply!

When I publish there is no dataSettings.json and plugins.json in AppData folder. So url redirect to install and giving the error. I will upload the plugins.json and dataStting.json via ftp and run the query and check.
Hope it will work.

By the way is there any way to publish including two of those files?

Thank You Again.
4 years ago
RE:  " System.Exception: A plugin with 'CurrencyExchange.ECB' system name is already defined"

Make sure you do not have multiple copies of the Nop.Plugin.ExchangeRate.EcbExchange.dll  file in subfolders of \Plugins

Thank You for your help!

I have only one .dll file for all plugins but error coming for all the plugins. I think, since there is no dataSettings.json and plugins.json in App_Data folder. When its trying to install Its saying already exist.

Is there is any way to include both of the file when publish via VS?

Thank You!
4 years ago
Did you ever find a solution to this?  This just began to happen after cleaning and rebuilding my solution in VS2019  ver 16.3.10.  
I'll try deleting the plugin - never used it regardless.
4 years ago
Did you find answer to this. Got same immediately after VS 16.3.10 upgrade.
4 years ago
You can see the solution to this problem in this commit.
4 years ago
DmitriyKulagin wrote:
You can see the solution to this problem in this commit.

Gave it a whirl on VS  16.3.10 with my 4.00 code and it worked as well. Have also just tried it on VS 16.4 that was just released and can confirm the change is still needed there as well
4 years ago
Where did you place the code in 4.00? Presume would be same in 4.10.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.