I am setting up a NuGet package for my team to use for all of our projects, internally. It contains code for configuring the NLog logger for whichever project references the package. However, our custom NLog.config file is not showing up in the final build, but all of the other files included in the NuGet package are there.
Here's my nuspec file:
<?xml version="1.0"?>
<package >
<metadata>
...
</metadata>
<files>
<file src="bin\Release\*.*" target="lib\net45" />
</files>
</package>
I tried adding this to the files, but it was redundant, and changed nothing:
<file src="bin\Release\NLog.config" target="lib\net45" />
Since we're including all of the files with *.*, they all show up in the .nupkg file in the lib/net45 folder. All of the .dlls, .xmls, and .configs are in the nupkg, including the NLog.config. So the file I need is making it into the package just fine.
The problem happens when I include this NuGet package in a project and look at the build output. The application's build output contains everything in the nupkg that I need, except the NLog.config. Even the Utilities.dll.config is included.
Is there something that needs to be specified in the nuspec file? Or in the Visual Studio project such as MSBuild settings? How do I make sure all of the files included in the NuGet package are copied to the application's build output?