2

I have the following nuspec structure:

lib
  net40
    mylib.dll

And the following nuspec file

<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    ...
    <references>
      <!-- don't want to add a reference to mylib.dll. Doesn't work! -->
    </references> 
    ...
  </metadata>

  <files>    
    <file src="bin\Release\**\*" target="lib\net40"/>
  </files>
</package>

I tried to make an empty references block, but it still adds a reference to mylib.dll. I really want mylib.dll to be in the lib folder, because resharper finds it with ALT + ENTER.

How can I omit the reference but still keep the file in my lib folder?

Marnix
  • 6,384
  • 4
  • 43
  • 78
  • What's the benefit of *not* having it as a reference? – Bart Dec 31 '15 at 12:02
  • There are multiple reasons that rely on each other. I could elaborate on the actual problem, but this is a solution that would help fix my actual problem. I tried to simplify the question. The actual problem is that I would like it to be on copy-local=false, but not for all consumers. So I cannot add it to the install script. But I do want to have Update-Package working automatically. So I wrote some other install scripts that fix most parts. But copy-local=false for some, but not all projects is not a general solution. – Marnix Dec 31 '15 at 12:12
  • Another use case would be design-time-only assemblies. You don't want them to be referenced by any regular project, but you want that visual studio finds them in the right folder for every framework version. – Anateus Mar 13 '17 at 18:07

0 Answers0