Key takeaways
- A plugin needs three things: a class library project, a plugin.json file and a class that inherits BasePlugin.
- nopCommerce 5.0 targets .NET 10 and plugins declare "5.00" in SupportedVersions; 4.80 targeted .NET 9 and "4.80".
- Inject the services you need into the plugin class; register your own services in a class that implements INopStartup.
- Most "plugin not found" problems are files that never reached Nop.Web\Plugins.
Payment methods, shipping calculators, tax providers and storefront widgets in nopCommerce are all plugins, built the same way your own extension will be. Once you know the pattern, changing checkout, the admin or a product page stops meaning edits to core code and becomes a contained module that survives upgrades.
This guide builds a small plugin, Nop.Plugin.Misc.HelloWorld, from an empty project to an entry under Configuration › Local plugins. We checked every file format against the nopCommerce 5.00.1 source and the official plugin guide on 26 November 2026, and we note where 4.80 differs.
How nopCommerce Plugins Work
Every plugin implements the IPlugin interface from Nop.Services.Plugins, almost always by inheriting BasePlugin, which implements the boilerplate for you. nopCommerce finds plugins at startup and lists them under Configuration › Local plugins.
On top of IPlugin, pick the interface that matches the plugin's job:
| Interface | Use it for |
|---|---|
| IPaymentMethod | Payment processing |
| IShippingRateComputationMethod | Shipping methods and rates |
| ITaxProvider | Tax rates |
| IWidgetPlugin | Content rendered in storefront widget zones |
| IExternalAuthenticationMethod, IMultiFactorAuthenticationMethod | Sign-in and MFA |
| IDiscountRequirementRule | New discount rules |
| IMiscPlugin | Anything that fits none of the above |
Our example is a settings-only plugin, so it uses IMiscPlugin. For a widget, our guide to adding a widget to a nopCommerce plugin covers IWidgetPlugin.
Need a plugin built rather than learning to build it? BSS writes and maintains nopCommerce plugins.
See nopCommerce servicesSet Up the Plugin Project
Add a Class Library project to the solution's Plugins folder, named Nop.Plugin.{Group}.{Name}. Replace its project file with this; it follows the official 5.00 template and the plugins in the 5.00.1 source.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputPath>$(SolutionDir)\Presentation\Nop.Web\Plugins\Misc.HelloWorld</OutputPath>
<OutDir>$(OutputPath)</OutDir>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Content Include="plugin.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Views\**\*.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
<ClearPluginAssemblies Include="$(SolutionDir)\Build\ClearPluginAssemblies.proj" />
</ItemGroup>
<Target Name="NopTarget" AfterTargets="Build">
<MSBuild Projects="@(ClearPluginAssemblies)" Properties="PluginPath=$(OutDir)" Targets="NopClear" />
</Target>
</Project>
CopyLocalLockFileAssemblies copies your plugin's own NuGet dependencies next to its DLL; set it to true if the plugin uses any package the core does not. The NopTarget step removes the assemblies nopCommerce already loads, so the plugin folder stays small.
Next to the project file, add plugin.json. This is what makes the plugin appear under Local plugins:
{
"Group": "Misc",
"FriendlyName": "Hello World",
"SystemName": "Misc.HelloWorld",
"Version": "1.00",
"SupportedVersions": [ "5.00" ],
"Author": "Your company",
"DisplayOrder": 1,
"FileName": "Nop.Plugin.Misc.HelloWorld.dll",
"Description": "A minimal example plugin for nopCommerce 5.0."
}
The views must be copied too
Every .cshtml file, including _ViewImports.cshtml, must reach the output folder. If it does not, the plugin installs and then its configuration page fails, because the view was never copied next to the DLL. The Content items above handle it; in Visual Studio the same setting is Build Action "Content" and "Copy if newer".
Write the Plugin Class
The plugin class is usually the smallest file in the project. Inherit BasePlugin, inject the services you need through the constructor, point GetConfigurationPageUrl at your configuration route, and override the install hooks to seed and remove settings:
using Nop.Core.Configuration;
using Nop.Services.Common;
using Nop.Services.Configuration;
using Nop.Services.Plugins;
using Nop.Web.Framework.Mvc.Routing;
namespace Nop.Plugin.Misc.HelloWorld;
public class HelloWorldSettings : ISettings
{
public string Greeting { get; set; }
}
public class HelloWorldPlugin : BasePlugin, IMiscPlugin
{
private readonly INopUrlHelper _nopUrlHelper;
private readonly ISettingService _settingService;
public HelloWorldPlugin(INopUrlHelper nopUrlHelper, ISettingService settingService)
{
_nopUrlHelper = nopUrlHelper;
_settingService = settingService;
}
public override string GetConfigurationPageUrl()
{
return _nopUrlHelper.RouteUrl("Plugin.Misc.HelloWorld.Configure");
}
public override async Task InstallAsync()
{
await _settingService.SaveSettingAsync(new HelloWorldSettings { Greeting = "Hello, world!" });
await base.InstallAsync();
}
public override async Task UninstallAsync()
{
await _settingService.DeleteSettingAsync<HelloWorldSettings>();
await base.UninstallAsync();
}
}
InstallAsync runs once, when the plugin is installed from Local plugins, and UninstallAsync reverses it. UpdateAsync runs when nopCommerce finds a higher Version in plugin.json for an installed plugin, which is where a data migration goes. Always call the base method, as the official guide says.
Put locale strings in InstallAsync with AddOrUpdateLocaleResourceAsync, as the core plugins do, and delete them by prefix in UninstallAsync. Plugins that skip this leave orphaned resources behind in every store they were tried on.
Add a Configuration Page and Route
The configuration page is a normal MVC controller in the admin area. nopCommerce expects three attributes on it:
[AutoValidateAntiforgeryToken]
[AuthorizeAdmin]
[Area(AreaNames.ADMIN)]
public class HelloWorldController : BasePluginController
{
private readonly ISettingService _settingService;
private readonly IStoreContext _storeContext;
public HelloWorldController(ISettingService settingService, IStoreContext storeContext)
{
_settingService = settingService;
_storeContext = storeContext;
}
public async Task<IActionResult> Configure()
{
var storeId = await _storeContext.GetActiveStoreScopeConfigurationAsync();
var settings = await _settingService.LoadSettingAsync<HelloWorldSettings>(storeId);
return View("~/Plugins/Misc.HelloWorld/Views/Configure.cshtml", settings);
}
}
Then register the route that GetConfigurationPageUrl names. This follows the RouteProvider in the 5.00.1 Google Analytics plugin:
public class RouteProvider : BaseRouteProvider, IRouteProvider
{
public void RegisterRoutes(IEndpointRouteBuilder endpointRouteBuilder)
{
endpointRouteBuilder.MapControllerRoute(name: "Plugin.Misc.HelloWorld.Configure",
pattern: "Admin/HelloWorld/Configure",
defaults: new { controller = "HelloWorld", action = "Configure", area = AreaNames.ADMIN });
}
public int Priority => 0;
}
With both in place, a Configure link appears next to the plugin under Local plugins once it is installed.
Register Your Own Services
Core services such as ISettingService, IStoreContext and ILocalizationService are already registered, so you inject them and that is all. You only register something when the plugin adds a service of its own, or replaces a core one.
Do it in a class that implements INopStartup, as the plugins in the 5.00.1 source do. Older guides show an IDependencyRegistrar class; current versions use INopStartup instead.
public class NopStartup : INopStartup
{
public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
//your own service
services.AddScoped<IGreetingService, GreetingService>();
}
public void Configure(IApplicationBuilder application)
{
}
public int Order => 3000;
}
Order controls when your registrations run. A value above the core's makes yours run after them, which is what you want when you override a core service.
From 4.80 to 5.0: What Changes in a Plugin
The plugin model is the same in both versions. For the plugins in the source, moving from 4.80 to 5.0 changed two lines:
| nopCommerce 4.80 | nopCommerce 5.0 | |
|---|---|---|
| TargetFramework | net9.0 | net10.0 |
| SupportedVersions | [ "4.80" ] | [ "5.00" ] |
Your own plugin may need more, because core service signatures can change between versions. Build it against the new source, fix what the compiler finds, then test install, configure and uninstall on a copy of the store. .NET 9 reached end of support on 10 November 2026, so a 4.80 store is due for that move.
Before you chase a "plugin not found" bug
- The DLL and its dependencies are in Nop.Web\Plugins\Misc.HelloWorld, not just your project's bin folder.
- plugin.json is next to the DLL and lists the store's version in SupportedVersions.
- Every .cshtml, including _ViewImports.cshtml, was copied.
- The solution was cleaned and rebuilt, and the application restarted.
When we upgrade a store, its custom plugins take most of the time, not the core. Our nopCommerce upgrade checklist covers the order we do it in.
Need a nopCommerce plugin built?
From payment and shipping integrations to admin tools and storefront widgets, our nopCommerce engineers write, test and maintain plugins for 4.80 and 5.0.
Frequently Asked Questions
Final Thoughts
A nopCommerce plugin is a project file, a plugin.json and one class, plus a controller and route when it has settings. Keep those small and the plugin moves between versions with a retarget and a rebuild.
From here, our guides to installing a plugin and building a payment plugin take the next steps.
Tell us what your plugin has to do. We will scope it, build it and keep it working through upgrades.
Talk to an expert