All Binaries in Output Plugin Folder

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi all, I found in the 3.80 documentation how to cleanup the Plugin output folder. But I can't figure out how to get the same result in version 4.20

Can anyone tell me how to do it?

thanks a lot
Marco
4 years ago
Hi Marco,

Please verify NopClear syntax in your plugin csproject file.

For nopCommerce 4.20

  <ItemGroup>  
    <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>


You can review Nivo slider's .csproj file.

Also, try with first build plugin and then re-build the entire solution.
Many times this working.
4 years ago
Hi rajupaladiya,
thanks for your reply. I have 1 question about your code.

It is necessary to reference the project ClearPluginAssemblies or not?

It would seem from your code that you did so:

  <ItemGroup>  
    <ClearPluginAssemblies Include="$(MSBuildProjectDirectory)\..\..\Build\ClearPluginAssemblies.proj" />
  </ItemGroup>

But in the Documentation the csproj example is quite different.




rajupaladiya wrote:
Hi Marco,

Please verify NopClear syntax in your plugin csproject file.

For nopCommerce 4.20

  <ItemGroup>  
    <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>


You can review Nivo slider's .csproj file.

Also, try with first build plugin and then re-build the entire solution.
Many times this working.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.