my custom plugin not showing under admin listing I tried with nopcommerce version 4.4 and 4.0.
My source code under plugin folder at root and after build it generate dll etc at location Presentation\Nop.Web\Plugins\Url.Redirect
Now when debug the code I get the following error.
maingPluginFile become null for my custom plugin in and condition plugin have wrong directory executed. my plugin setting are perfectly same as other built in plugin have.
//plugin have wrong directory
if (mainPluginFile == null)
{
incompatiblePlugins.Add(pluginDescriptor.SystemName);
continue;
}
My plugin.Json file.
{
"Group": "Url Redirect",
"FriendlyName": "Url Redirect",
"SystemName": "Url.Redirect",
"Version": "1.34",
"SupportedVersions": [ "4.00" ],
"Author": "nopCommerce team",
"DisplayOrder": 1,
"FileName": "Nop.Plugin.Url.Redirecturl.dll",
"Description": "This plugin offer url redirect"
}
my csproj file.
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<Copyright>Copyright © Nop Solutions, Ltd</Copyright>
<Company>Nop Solutions, Ltd</Company>
<Authors>Nop Solutions, Ltd</Authors>
<Version>1.14</Version>
<Description>This plugin allows to configure and manage pickup points when "Pickup in store" option is enabled</Description>
<PackageLicenseUrl>
</PackageLicenseUrl>
<PackageProjectUrl>http://www.nopcommerce.com/</PackageProjectUrl>
<RepositoryUrl>https://github.com/nopSolutions/nopCommerce</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
</PropertyGroup>
<ItemGroup>
<None Remove="logo.png" />
<None Remove="plugin.json" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Url.Redirect</OutputPath>
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Url.Redirect</OutputPath>
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>
<ItemGroup>
<Content Include="plugin.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
</ItemGroup>
<!-- 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>
</Project>