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

Why are files in NuGet content folder not copied to output directory?

$
0
0

From the official documentation

Think of the content folder as the root of the target application that ultimately consumes the package. To have the package add an image in the application's /images folder, place it in the package's content/images folder.

When the documentation says 'the application's folder', does it not refer to the output directory of the project that is using the package? If so, why are the files not copied to this directory? I have created a dummy NuGet package with a 'content' folder containing only a text file. I would expect that when I install this package in a project, and build the project, the text file would end up in the output directory, but it does not.

I have searched and found questions about the same issue (i.e. how to copy files to output directory), but I haven't found any explanation of why the above does not work.

I am also just confused about the fact that it seems to be so complicated (based on the number of questions online regarding this, with no particularly simple answers) to just put some simple files in the target project's output directory. Is it not common that NuGet packages need certain files, e.g. configuration files? Shouldn't there be a very simple solution for this?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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