Allow Specifying Unreferenced Assemblies
Related Issue: 981
Discussion: Designer Assemblies
There are three different cases here.
- Designer: You have a set of assemblies that should not be referenced, and
should not be copied to bin, but most be placed next to the runtime assemblies.
- xUnit: You have a set of assemblies that should be referenced, but from a
directory other than lib.
- Runtime only assemblies: You have a set of assemblies that
should not be referenced, but should be copied to bin.
We need a way to opt into these scenarios.
Proposal 1: New <references> element in within the
<metadata> section of NuSpec.
If this element is omitted, we get the normal behavior. If it’s specified, only assemblies listed in the section are referenced and they’re referenced from wherever they may be located.
<reference file="xunit.dll" />
<reference file="xunit.extensions.dll" />
- The reference element's file attribute must only specify the file name, and not a path to the file.
- We’re handling Scenario #1 directly.
- Scenario #2 can be accomplished by having copies in both Tools/Lib if the author cares about having the tool loaded into the PS path. Otherwise package author can move assemblies and runner into lib.
- Not handling scenario #3.
- How do we handle copying assemblies to the output folder if they’re not referenced?