title: dotnet core nuget package copying content files on restore
body: <p>So I feel like I have come to the end of the rope here, but hoping someone knows more than I do here. I have some <code>Typescript</code> files, though that is mostly irrelevant as I am having this problem with all content files.</p>
  
  <p>I am able to generate a <code>nuget</code>, or more precisely <code>dotnet pack</code>, nuget package that includes my content files in the package by using this in the <code>.csproj</code> of my <code>parent</code> project:</p>
  
  <pre><code>&lt;ItemGroup&gt;
    &lt;Content Include="Scripts\Utility.ts"&gt;
      &lt;Pack&gt;true&lt;/Pack&gt;
      &lt;PackagePath&gt;contentFiles\Scripts\;content\Scripts&lt;/PackagePath&gt;
    &lt;/Content&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>I can browse the generated <code>.nupkg</code> and see that indeed the file was added to the package in both the <code>content\Scripts</code> and <code>contentFiles\Scripts</code> locations</p>
  
  <p>The problem is that whenver I consume this package in my 'child' progect, that <code>Typescript</code> never gets copied into any folder of the <code>child</code> project, though I can see it extracted in the <code>.nuget\packages\parent\...</code> folders.</p>
  
  <p>At first I thought it was something with my initial settings in the <code>parent</code> project, and it may be, but after trying what seems like everything in the book, that fails to copy the content files to the <code>child</code> project. I then tried going the dark path of trying to use <code>Init.ps1</code> in the <code>tools</code> folder of my package, and though it was impossible to debug, it also seemed to run sporatically (I completely unistalled and reinstalled the package and it still failed to run most of the time.) This could be the way but I don't know why I can't get it to output to the <code>Package Manager Console</code>... maybe there's still hope with <code>Init.ps1</code> but I can't seem to figure it out. Finally I see some potential with a <a href="https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets" rel="noreferrer">nuget <code>.targets</code> file</a> but I can's seem to grasp how to use it for my purpose either! I would love some feedback as to how to get this done.</p>