0

We are using TFS build steps for creating nuget packages. So automatically TFS does this job, i mean, it creates firstly nuspec file and then creates nupkg.

So, this package contains my xml settings but the problem it does not copy into the debug/relase folder when I add this nuget package to a project. But I see that the content is added into the project, the problem is only these content files not copies to the build folder.

I saw that there is some solution for creating nuget package manually. (I also tried these but not worked for me even though) TFS creates all things by itself.

Well, my content's properties are like that

enter image description here

So i couold not solve this problem. I use NuGet 3.3.

ertan2002
  • 1,458
  • 1
  • 32
  • 68
  • What's the build are you using? vNext or XAML? If you are using vNext build, could you find the nuget packages folder located on the hosted build server: http://stackoverflow.com/questions/41559902/where-is-the-nuget-packages-folder-located-on-a-hosted-build-server-using-tfs/41564070#41564070 – PatrickLu-MSFT Jan 13 '17 at 09:21
  • This might be helpful to you: https://learn.microsoft.com/it-it/nuget/guides/create-net-standard-packages-vs2015#create-and-update-the-nuspec-file – Rui Jarimba Jan 16 '17 at 21:00

1 Answers1

1

The contentFiles section of the nuspec for packages.config projects, it only add the files into the project. If you want to change the files' CopytoOutPut property, you need to use an install.ps1 script. You could refer to the this discussion.

Following thread provide some code snippet of the install.ps1.

Set content files to "copy local : always" in a nuget package

So you need to add the install.ps1 script into tools folder for your packages when TFS creating this package.

Community
  • 1
  • 1
Weiwei
  • 3,674
  • 1
  • 10
  • 13