4. If you take reference one plugin from another make sure that it is not copied to the referred plugin folder.
I am experiencing this problem. How do you ensure that it is not copying?
Did you try to set copy local "No" after adding the plugin as a reference? If not work then you can check ClearPluginAssemblies.proj and modify it or create your own(suppose YourPluginClearPluginAssemblies.proj). Then change the MSBuild Projects reference of your plugin by Editing Project file (yourplugin.csproj). If none of the above work then delete it manually when deploying to production but do not keep the same .dlls to multiple paths.
Well, after further inspection the following:
<!-- 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" />
was missing from the plugin .csproj file. Thank you