3

I've been working on a Nuget package using the newest version of Nuget (3.3) and I am trying to include content using the new "contentFiles" feature. However, Nuget is completely refusing to copy content files into the destination project after/during installation. It correctly includes both DLL files that I reference into the project. Here is a copy of my .nuspec file:

<?xml version="1.0"?>
<package >
  <metadata minClientVersion="3.3">
    <id>Flare.Framework</id>
    <version>1.0.3</version>
    .... omitted ....
    <references>
      <group>
        <reference file="Flare.Framework.dll" />
        <reference file="OpenTK.dll" />
      </group>
    </references>
    <contentFiles>
      <files include="**/*"/>
    </contentFiles>
  </metadata>
  <files>
    <file src="*.dll" target="lib/net45" />
    <file src="*.dll.config" target="contentFiles/any/net45" />
    <file src="*.pdb" target="contentFiles/any/net45" />
  </files>
</package>

The end folder structure, after installation, looks like this:

TestProject
|- packages
   |- Flare.Framework.1.0.0
      |- lib
         |- net45
            |- Flare.Framework.dll
            |- ...
      |- contentFiles
         |- any
            |- net45
               |- ...

That seems correct to me, but the files in the contentFiles/any/net45 aren't actually being added to the .csproj file. The only file added is the packages.config file.

Pip
  • 4,387
  • 4
  • 23
  • 31

0 Answers0