after I upgrad plugins to nopCommerce 4.50 geting this error Object reference not set to an instance of an object.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 anni tempo fa
after i upgrade y surce code of my plugin i get this error
in local plugin work fine but when i install it on my server in nop ver  4.5 iget this issue
so i test the the build of nopcomerce of Plugin 'Cash On Delivery (COD) plugin and I get the same issue
any idea ?
here is the full log file

Unhandled exception. System.Exception: Plugin 'Cash On Delivery (COD)'. Object reference not set to an instance of an object.
Object reference not set to an instance of an object.

---> System.Exception: Plugin 'Cash On Delivery (COD)'. Object reference not set to an instance of an object.
---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.<>c__DisplayClass14_4.<InitializePlugins>b__11(ValueTuple`2 pluginInfo)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
   --- End of inner exception stack trace ---
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager, PluginConfig pluginConfig)
   at Nop.Web.Framework.Infrastructure.Extensions.ServiceCollectionExtensions.ConfigureApplicationServices(IServiceCollection services, WebApplicationBuilder builder)
   at Program.<Main>$(String[] args)
2 anni tempo fa
Are you using VS2022 or VS2019 ?
2 anni tempo fa
Using vs VS2022
2 anni tempo fa
i found the issue was in plugins.json
1 anno tempo fa
Getting same kind of error message when we moved from 4.2 to 4.5. It was from plugins.json..do u got a fix for this ?
1 anno tempo fa
It seems odd that "the issue was in plugins.json".
Here's an example.  Make sure you have all the fields with values.
{
  "Group": "Shipping rate computation",
  "FriendlyName": "Shipping Director",
  "SystemName": "Shipping.Director",
  "Version": "1.57",
  "SupportedVersions": [ "4.50" ],
  "Author": "nopTools",
  "DisplayOrder": 1,
  "FileName": "Nop.Plugin.Shipping.Director.dll",
  "Description": "Shipping Director allows a store owner to calculate shipping options and rates for complex scenarios"
}


(Also, check that your  "FileName" references the correct dll file.)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.