locked
Copying the NuGet packages folder pre-build RRS feed

  • Question

  • I have a build that I am setting up for a website and it has numerous NuGet packages that it depends on.  How can I copy the current packages prior to the actual code compile as a build step into the appropriate directory on the build server?  Currently I am getting numerous build failures because the relative reference in the project file does not map to anything on my build server.

    BTW, I am running VS2012 and TFS 2010.


    Thanks, -ja

    Thursday, September 20, 2012 9:53 PM

Answers

  • Hi John,

    If misunderstood anything, please describe your question in more detail and we will be able to provide the better responses.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 24, 2012 9:35 AM
    Moderator
  • The NuGet packages get mapped during the build process.  I did get the build process working correctly.  I ended up installing some of the libraries on the build server directly instead of relying on what was in the packages folder.  For now I will consider this closed as we will be upgrading our TFS in about a week to 2012.

    Thanks, -ja

    Monday, September 24, 2012 9:21 PM

All replies

  • More info and something I just don't understand.  I created a VM to test this out and it is working just fine (building successfully) and I did not do anyting to get it to work, i.e. no copying of files pre-build.

    Thanks, -ja

    Thursday, September 20, 2012 10:39 PM
  • Hi John, 

    Thanks for your post.

    We usually using the following two way to reference dlls when using Team Build:

          1 Create a Assemblies folder under Solution, and add all your dlls in this folder. After we check in the solution into TFS, the Team Build Service will get the solution from TFS to build on the Build machine, in this case, the Assemblies folder under solution will be get together. The structure like this:

                     TeamProject

                            /Solution1

                     /Assemblies

                     /Poject1

                     /Poject2

                     /…

                            /Solution2

                            …

            2 Create the same common folder on the Build machine as you created on your client, and the folder path is same. So when the Team Build to build the solution on build machine, it will try to find the dlls on the Build machine follow the relative path which your set in your project.

    You said you can build this website on that VM correctly, please check whether that NuGet packages existed on that VM, or the NuGet packages be mapped to that VM during Team Build.  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Friday, September 21, 2012 6:18 AM
    Moderator
  • Hi John,

    If misunderstood anything, please describe your question in more detail and we will be able to provide the better responses.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 24, 2012 9:35 AM
    Moderator
  • The NuGet packages get mapped during the build process.  I did get the build process working correctly.  I ended up installing some of the libraries on the build server directly instead of relying on what was in the packages folder.  For now I will consider this closed as we will be upgrading our TFS in about a week to 2012.

    Thanks, -ja

    Monday, September 24, 2012 9:21 PM