How can I copy plug-in DLLs from a sub folder using NuGet

22 views Asked by At

For a .NET Framework project (SDK style) I'm trying to create a Nuget package including code, documentation and additional plug-ins from a user control.

After creating my NuGet package and using it in a test project, all that's being copied when I build my test project is the code, the documentation and the .\de resource directory content, but not the bin and bin64 directories' content containing the plug-ins.

How can I make the content of the bin and bin64 directories copied, too?

Here's the directory structure of my NuGet package source:

Package.nuspec
ReadMe.md     
contentFiles\any\any\Barcode.Windows.Forms.xml       
contentFiles\any\any\Barcode.xml
contentFiles\any\any\DocumentServer.Windows.Forms.xml
contentFiles\any\any\DocumentServer.xml
contentFiles\any\any\Drawing.Windows.Forms.xml       
contentFiles\any\any\Drawing.xml
contentFiles\any\any\TextControl.Server.xml
contentFiles\any\any\TextControl.Windows.Forms.xml   
contentFiles\any\any\TextControl.xml
lib\net\Barcode.dll
lib\net\Barcode.Windows.Forms.dll
lib\net\DocumentServer.dll
lib\net\DocumentServer.Windows.Forms.Design.dll
lib\net\DocumentServer.Windows.Forms.dll       
lib\net\Drawing.dll
lib\net\Drawing.Windows.Forms.dll
lib\net\ImageProvider.dll
lib\net\txpdf.dll
lib\net\SVGGenerator.dll
lib\net\TextControl.dll
lib\net\TextControl.Server.dll
lib\net\TextControl.Windows.Forms.Design.dll
lib\net\TextControl.Windows.Forms.dll       
lib\net\bin\tx_css.dll
lib\net\bin\tx_doc.dll
lib\net\bin\tx_dox.dll
lib\net\bin\tx_htm.dll
lib\net\bin\tx_pdf.dll
lib\net\bin\tx_rtf.dll
lib\net\bin\tx_xlx.dll
lib\net\bin\tx_xml.dll
lib\net\bin\txic.dll
lib\net\bin\txkernel.dll
lib\net\bin\txtools.dll
lib\net\bin64\tx_css.dll
lib\net\bin64\tx_doc.dll
lib\net\bin64\tx_dox.dll
lib\net\bin64\tx_htm.dll
lib\net\bin64\tx_pdf.dll
lib\net\bin64\tx_rtf.dll
lib\net\bin64\tx_xlx.dll
lib\net\bin64\tx_xml.dll
lib\net\bin64\txic.dll
lib\net\bin64\txkernel.dll
lib\net\bin64\txtools.dll
lib\net\de\Barcode.resources.dll
lib\net\de\DocumentServer.resources.dll
lib\net\de\DocumentServer.Windows.Forms.Design.resources.dll
lib\net\de\Drawing.resources.dll
lib\net\de\TextControl.resources.dll
lib\net\de\TextControl.Windows.Forms.Design.resources.dll   
lib\net\net6.0-windows\TextControl.Windows.Forms.Design.dll 
lib\net\net6.0-windows\TextControl.Windows.Forms.dll

This is my Package.nuspec file's content:

<?xml version="1.0" encoding="utf-8"?>
<package>
  <metadata>
    <id>TxTextControl</id>
    <version>1.0.0</version>
    <authors>Me</authors>
    <readme>ReadMe.md</readme>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <license type="expression">MIT</license>
    <description>This is my package description</description>
    <copyright>2024</copyright>
    <tags>TextControl</tags>
    <contentFiles>
      <files include="**\*.xml" buildAction="Content" copyToOutput="true"/>
    </contentFiles>
  </metadata>
</package>

And this is the build result:

NuGetTest.dll
NuGetTest.pdb
Barcode.dll
Barcode.Windows.Forms.dll
Barcode.Windows.Forms.xml
Barcode.xml
DocumentServer.dll
DocumentServer.Windows.Forms.Design.dll
DocumentServer.Windows.Forms.dll
DocumentServer.Windows.Forms.xml
DocumentServer.xml
Drawing.dll
Drawing.Windows.Forms.dll
Drawing.Windows.Forms.xml
Drawing.xml
ImageProvider.dll
txpdf.dll
SVGGenerator.dll
TextControl.dll
TextControl.Server.dll
TextControl.Server.xml
TextControl.Windows.Forms.Design.dll
TextControl.Windows.Forms.dll
TextControl.Windows.Forms.xml
TextControl.xml
de\Barcode.resources.dll
de\DocumentServer.resources.dll
de\DocumentServer.Windows.Forms.Design.resources.dll
de\Drawing.resources.dll
de\TextControl.resources.dll
de\TextControl.Windows.Forms.Design.resources.dll
0

There are 0 answers