I create a package only with building tools: .prop and .target and a DLL with MSBuild tasks. I specified these files to be placed in the build folder in the <file> section of the nuspec file:
<files> <file src="bin\Release\Acme.Build.Foo.dll" target="build" /> <file src="MSBuild\Acme.Build.Foo.props" target="build" /> <file src="MSBuild\Acme.Build.Foo.targets" target="build" /> </files>
The nuspec Acme.Build.Foo.nuspec Acme.Build.Foo.nuspec is placed next to Acme.Build.Foo.csproj .
If I use nuget pack Acme.Build.Foo.csproj , the dll file will also be packed into the lib/ package folder and added as ference when adding the package to the target project.
If I used the nuget pack Acme.Build.Foo.nuspec , I would lose the intricacies of keyword expansion like $id$ , etc.
Can I get the best of both? Is it possible to (1) prevent a project from exiting lib/.../ automatically or (2) if not, at least prevent this file from being added as a reference to a consumption project?
I am using apparently the latest NuGet 3.2.0.10516.
source share