locked
Dnu packs wrong dlls in TFS build. RRS feed

  • Question

  • My solution contains 2 aspnet5 projects. When make build in tfs, the artifacts of these 2 projects are generated in $(BinariesRoot)\$(Configuration). And the detail steps are like:
    1. Build the first project, it outputs Project1.dll in the $(BinariesRoot)\$(Configuration).
    2. Dnu(Microsoft.Dnx.Tooling.dll) packs all the dlls into nuget pack in the folder. Then Project1.nupkg which contains Project1.dll are created.
    3. Build the second project, it outputs Project2.dll in the same folder.
    4. Dnu still packs all the dlls in the folder. Then Project2.nupkg which contains both Project1 and Project2.dll are created. But the expected is Project2.nupkg should only contain Project2.dll.

    In my local machine, the binaries are output in different folder. So this issue doesn't occur.

    Is there any way to specify the different out directory for the different project in the tfs build?

    BTW, I am not familiar with TFS/build definition related configurations. My build definition contains not only the aspnet5 solution, but also others non-aspnet5 solutions.

    Thanks.

    Wednesday, January 6, 2016 1:23 AM

Answers

  • I have solved this issue by setting "GenerateProjectSpecificOutputFolder" to "true", according to:

    https://blog.stangroome.com/2012/05/10/override-the-tfs-team-build-outdir-property-net-4-5/


    Tuesday, January 19, 2016 3:38 AM

All replies

  • Hi Noel,

    Thank you for posting here.

    In your scenario, you want to separate the out directory for the different projects. In TFS vnext build, you could add a Publish Build Artifact step after building each project to separate the output location.

    You could write a Powershell script to copy the output files of Project2 to a new location.

    http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/19/use-powershell-to-copy-files-and-folders-to-a-new-location.aspx . Then add a PowerShell step to run this script file.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 8, 2016 9:28 AM
    Moderator
  • I have solved this issue by setting "GenerateProjectSpecificOutputFolder" to "true", according to:

    https://blog.stangroome.com/2012/05/10/override-the-tfs-team-build-outdir-property-net-4-5/


    Tuesday, January 19, 2016 3:38 AM
  • Hi Noel,

    Thank you for sharing your experience here. It will be very beneficial for other community members having the similar questions.

    All your participation and support are very important to build such harmonious/ pleasant / learning environment for MSDN community.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 19, 2016 5:09 AM
    Moderator