Copy libs without any references

Topics: General
May 8, 2014 at 1:55 PM
Is there any way to only deploy the assemblies, I do not want to add a reference to any single assembly. I know if you use <references/> any assemblies not included will not be referenced, but this doesn't do what i want.
May 21, 2014 at 10:59 AM
Edited May 21, 2014 at 11:06 AM

I have the same issue. For none of the dll's in my package should a reference be created. I decide which one to load at runtime.
I would have expected an empty <references/> section to work, because the section is there, but is does not contain any <reference .../> items.
The docs say: If this element is omitted, then the usual behavior applies, which is to reference every assembly in the lib folder. So I would expect the other way around to work as well: if the section is there, but without reference items, then no references should be created. But, even with the empty section specified, the references are still created.

I was also trying to use a Files section with an exclude to handle this usecase, but the Package Explorer seems to ignore that section (Filed a issue here). I haven't tried to manually create a package though...


PS: Related to discussion 537969
Jul 8, 2014 at 3:49 AM
This continually plagues me. One would think that it is an uncommon scenario but NuGet is the only system in Visual Studio (that I know of) for build-time downloading of content/resources. For example, if I want to create a tool that runs as part of the build process I can build an executable (which may reference other assemblies) and put it (and its references) into the tools folder. I can then add a .targets file to the build folder that will cause my build-chain tool to hook up automatically. Everything is great except I can't easily get NuGet to stop creating references on my behalf!

In my use cases, often the NuGet package is either content or build-chain tools. Getting this stuff distributed via NuGet is so close except for this one major hurdle. :/