Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Nuget package doesn't copy contentFiles specified in .nuspec

$
0
0

I have a custom nuspec file for a c# project. In this example, the project is supposed to produce a nuget package which has an exe and a folder with some extra content in it.

<?xml version="1.0" encoding="utf-8"?><package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"><metadata><id>$id$</id><version>$version$</version><authors>$authors$</authors><description>$description$</description><contentFiles><files include="Program.exe" buildAction="Content" copyToOutput="true" /><files include="Folder/**/*" buildAction="Content" copyToOutput="true" /></contentFiles></metadata><files><file src="src\Program.exe" target="contentFiles"/><file src="src\Folder\**\*" target="contentFiles\Folder"/></files></package>

When I inspect the .nupkg, the files are all there inside of a contentFiles folder. However when I try and consume the package with a package reference

<PackageReference Include="MyPackage" Version="1.0.0" />

..the files don't actually end up in the output folder. It's probably a small issue but I can't seem to be able to find an answer. Any hints would be great.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>