Plugin not copying file to Plugins/Bin

2 years ago
Hi, I am using the nuget package Select.HtmlToPdf.NetCore and I added the below code to my project solution and it copies the "Select.HtmlToPdf.dll" and "Select.Html.dep" to the "\Plugins\Distributor.Products" directory. However, it does not copy them to "Plugins\bin". It only copies "Select.HtmlToPdf.dll"

  <ItemGroup>
    <PackageReference Include="HtmlAgilityPack.NetCore" Version="1.5.0.1" />
    <PackageReference Include="Select.HtmlToPdf.NetCore" Version="18.4.0" />
  </ItemGroup>

  <Target Name="FilterCopyLocalItems" AfterTargets="ResolveLockFileCopyLocalProjectDeps">
    <ItemGroup>
      <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)' != 'Select.HtmlToPdf'" />
      <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)' != 'Select.Html.dep'" />
    </ItemGroup>
  </Target>


Thoughts?
2 years ago
bump
1 year ago
According to this publication, you just have to add the following line in your .csproj
https://github.com/nopSolutions/nopCommerce/issues/3208
   <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1 year ago
espiro16 wrote:
According to this publication, you just have to add the following line in your .csproj
https://github.com/nopSolutions/nopCommerce/issues/3208
   <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>


I can try. But I think I have it. It’s when it goes to the Bin folder. Not my plugin build folder.
2 months ago
You are right, Try this, it works when compiling, but I'm not sure if it will work when starting Nopcommerce, since in the web.config you can clean or not the bin folder

  <Target Name="CopyCustomContent" AfterTargets="AfterBuild">
    <Copy SourceFiles="Content\Select.Html.dep" DestinationFolder="$(OutDir)../bin" />
  </Target>
2 months ago
I solved it, putting the full path in the global settings.    

GlobalProperties.HtmlEngineFullPath = baseUrl+ "\\Plugins\\Misc.Quotation\\Content\\Select.Html.dep";
1 month ago
espiro16 wrote:
I solved it, putting the full path in the global settings.    

GlobalProperties.HtmlEngineFullPath = baseUrl+ "\\Plugins\\Misc.Quotation\\Content\\Select.Html.dep";


where i nop did you put this?
1 month ago
and is this in 4.40? Im struggling.