I am building a package with build tools only: a .prop
and a .target
files, and a dll with MSBuild tasks. I specified these files to be placed into 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 file Acme.Build.Foo.nuspec
is placed beside the Acme.Build.Foo.csproj
.
If I use nuget pack Acme.Build.Foo.csproj
, the dll file gets also packaged into the lib/
folder of the package, and added as a fererence when adding the package to the target project.
If I would use nuget pack Acme.Build.Foo.nuspec
, I'd lose the niceties of keyword expansion, as $id$
etc.
Can I have the best of both? Is it possible to (1) prevent project output from going into lib/.../
automatically or (2) if not, at the least prevent that file from being added as a reference to the consuming project?
I am using the apparently the latest NuGet 3.2.0.10516.
The __init__.py files are required to make Python treat directories containing the file as packages. This prevents directories with a common name, such as string , unintentionally hiding valid modules that occur later on the module search path.
A module can be imported by another program to make use of its functionality. This is how you can use the Python standard library as well. Simply put, a module is a file consisting of Python code. It can define functions, classes, and variables, and can also include runnable code.
Project name – enter a name for your project in quotes. Python packages and Python modules to include in the distribution (dist) – the find_packages(',') default argument will incorporate all packages that include an __init__.py file and are located in the local directory (dir) where setup.py is installed.
Use the -tool
option. So all other files are placed in tools
folder.
nuget pack Acme.Build.Foo.csproj -tool
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With