Search code examples
nugetteamcitynuspec

Correct way to configure <file src = <whatever> /> in a .nuspec


Before I get blasted and downvoted, I have gone through all the documentation on the microsoft and nuget sites.

I am trying to create a nuget package but not abler to figure out what should be the path for the below in the .nuspec file

<files>
<file src ="xxx.dll" target = "lib\net45" />
</files>

I have tried "bin\debug\xxx.dll", "bin\release\xxx.dll", "xxx.dll", "\xxx.dll"

Team city (which is where I am building and creating the nuget package) throws the following different errors at me:

File not found: 'xxx.dll'.

[pack] Could not find a part of the path 'D:\TFS\Work\56c5815022c86f81\bin\release'.

Any insights or samples of how you provide the path are appreciated.


Solution

  • Actually the TC build (in the previous msbuild step) mentions which directory it is 'outputting' the DLL to, I just plugged this into the nuspec :)

    Edit: It was looking for "parentFolder\bin\debug\xxx.dll"