Sometimes plugins not loading. whenever am changing or creating new plugin it happens

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Sometimes plugins not loading, its happening when i change code of my custom plugin. after endless clean buld sometime it will load, please explain what is the real issue ?
4 years ago
I have just been developing a plugin and found that I needed to restart the application pool of my IIS server every time I built the plugin (only build of plugin was required, not the whole project).
4 years ago
@shabeerpremier
What version of nopCommerce?
Is it when you are running/debugging in Visual Studio?
  If debugging, are you using IIS Express or Local IIS (in the toolbar)?
4 years ago
New York wrote:
@shabeerpremier
What version of nopCommerce?
Is it when you are running/debugging in Visual Studio?
  If debugging, are you using IIS Express or Local IIS (in the toolbar)?


1. 4.20
2. Yes
3. Local IIS
4 years ago
Make sure your developed plugin build folder avaible in Nop.Web > Plugins folder. Also make sure plugin.json file is in that folder. Finally check system warning in admin panel.
4 years ago
shabeerpremier wrote:
Sometimes plugins not loading, its happening when i change code of my custom plugin. after endless clean buld sometime it will load, please explain what is the real issue ?


Can you please share your plugin's .csproj? Please right click on the project then press "Edit Nop.Plugin.PluginTyple.YourPluginName" and post it at forum. After right click 9th option from the top.
4 years ago
sina.islam wrote:
Sometimes plugins not loading, its happening when i change code of my custom plugin. after endless clean buld sometime it will load, please explain what is the real issue ?

Can you please share your plugin's .csproj? Please right click on the project then press "Edit Nop.Plugin.PluginTyple.YourPluginName" and post it at forum. After right click 9th option from the top.



<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <Copyright>Copyright © Premier Technology Solutions</Copyright>
    <Company>Premier Technology Solutions</Company>
    <Authors>Shabeer M</Authors>
    <PackageLicenseUrl></PackageLicenseUrl>
    <PackageProjectUrl>http://www.nopcommerce.com/</PackageProjectUrl>
    <RepositoryUrl>https://github.com/nopSolutions/nopCommerce</RepositoryUrl>
    <RepositoryType>Git</RepositoryType>
    <OutputPath>..\..\Presentation\Nop.Web\Plugins\Payments.Credit</OutputPath>
    <OutDir>$(OutputPath)</OutDir>
    <!--Set this parameter to true to get the dlls copied from the NuGet cache to the output of your project.
    You need to set this parameter to true if your plugin has a nuget package
    to ensure that the dlls copied from the NuGet cache to the output of your project-->
    <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
  </PropertyGroup>

  <ItemGroup>
    <None Remove="logo.png" />
    <None Remove="plugin.json" />
    <None Remove="Views\Configure.cshtml" />
    <None Remove="Views\PaymentInfo.cshtml" />
    <None Remove="Views\_ViewImports.cshtml" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="logo.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="plugin.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Views\Configure.cshtml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Views\PaymentInfo.cshtml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Views\_ViewImports.cshtml">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
    <ClearPluginAssemblies Include="$(MSBuildProjectDirectory)\..\..\Build\ClearPluginAssemblies.proj" />
  </ItemGroup>

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

</Project>
4 years ago
Your .csproj looks good. If you change any code of the plugin then you have to build one time but not endless. With visula studio 2017 the plugin should work properly.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.