How ClearPluginAssemblies solution works.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Can anybody please help me to figure out how it(ClearPluginAssemblies ) is working? I am using nopCommerce4.3 for a non-eCommerce solution but want to keep the basic architecture and so far so good. Except plugin output folders do not clean up. And when publish the solution it is not copying the plugin folders to the published directory.

I change the name of each solution like
1. nop.web==>CampaignManagement.Web
2. nop.core==>CampaignManagement.Core

and others like the same way.
3 years ago
By replacing
<OutputPath>$(MSBuildProjectDirectory)\..\Presentation\Nop.Web\bin\$(Configuration)</OutputPath>
with bellow resolve the unwanted *.dll at the output directory. But at publish time plugins folder not appearing.
<OutputPath>$(MSBuildProjectDirectory)\..\Presentation\CampaignManagement.Web\bin\$(Configuration)</OutputPath>
3 years ago
Ultimately it is working as expected. Below are the steps I follow hope it will help others in the future.

1. Build==>src==>ClearPluginAssemblies==>Program.cs
protected const string FILES_TO_DELETE = "dotnet-bundle.exe;CampaignManagement.Web.pdb;" +
            "CampaignManagement.Web.exe;CampaignManagement.Web.exe.config;" +
            "CampaignManagement.Core.dll;CampaignManagement.Core.pdb;" +
            "CampaignManagement.Data.dll;CampaignManagement.Data.pdb;" +
            "CampaignManagement.Web.Framework.dll;CampaignManagement.Web.Framework.pdb;"+
            "CampaignManagement.Services.dll;CampaignManagement.Services.pdb";

2. After the build I remove "ClearPluginAssemblies.dll" from the Build folder then copy the newly build "ClearPluginAssemblies.dll". Which is taking care to remove unwanted *.dll

3. The plugins folder was not copied to the out folder after publish because I removed
    <None Include="Plugins\**" CopyToPublishDirectory="PreserveNewest" />
     <ItemGroup>
    <Folder Include="Plugins\" />
  </ItemGroup>

from CampaignManagement.Web
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.