Answered Reference path to other solution

  • Monday, August 20, 2012 10:56 PM
     
     

    I have 2 solutions in my TFS project.

    One solution reference the other.  Where and How do I put the reference path to the other solution?

    I need to path out to the folder where the dll's are built.

    When using TFS on disk I added the paths to the MsBuild Arguments

    /p:ReferencePath="E:\TFSBuilds2\Solutions\TE2\Binaries; E:\TFSBuilds2\Solutions\References\Sources\References; E:\TFSBuilds2\Solutions\Misc\Binaries;


    Thanks, Terrence


    • Edited by Terrence_ Monday, August 20, 2012 11:03 PM
    •  

All Replies

  • Tuesday, August 21, 2012 3:00 PM
     
     

    Hello, Microsoft are you out there?


    Thanks, Terrence

  • Tuesday, August 21, 2012 3:08 PM
    Owner
     
     
    Have you tried adding the same in the build definition for MSBuild argument?
  • Tuesday, August 21, 2012 3:37 PM
     
     

    Well the paths are different.

    On TFS local, I was building the TE solution and pusing those dlls to a folder.  Then in the Common solution I was pathing to that folder.  I don't think that is the best practice.

    Locally in visual studio, we path to the sister solution's bin folders to add references.  So if my common project needs a dll from the TE solution we add reference to

    ..\TE\MyProj\Bin\Release.

    I don't understand how to path out a reference in TFSPreview, as there is no c:\ drive.  Could you give me a few examples?

    And please confirm that the MSBuild argument is the place to put reference paths?


    Thanks, Terrence

  • Tuesday, August 21, 2012 5:03 PM
    Owner
     
     

    Yep, you cannot persist any dll on the hosted build machine so this type of dependencies, either you have to build both the sol in same build def then you have both and copy same way and reference to the path else it have to check-in the source control.

    With hosted build, it check-in the drop folder to source control and you can use that path in another solution to reference.

    Or the last option would be use TFS Preview but local build controller and maintain the same structure that you have before.

  • Tuesday, August 21, 2012 5:09 PM
     
     

    The drops foldername changes with each build.

    Drops/TE/TE_20120821.6

    Drops/TE/TE_20120821.7

    How can I drop to a statically named folder that does not change so that I can reference the folder in my other solution?


    Thanks, Terrence

  • Tuesday, August 21, 2012 7:36 PM
     
     

    I am having trouble with the MSBuild Arguments.

    /p:ReferencePath="$/MACWebProject/Drops/TE/TE_20120821.9; $/MACWebProject/References"

    both of these locations exist and have the correct dlls in them, yet the build is blowing up because it can't find files in those folders.

    Considered "$/MACWebProject/References\DDay.iCal.dll", but it didn't exist.


    Thanks, Terrence

  • Wednesday, August 22, 2012 3:28 PM
    Owner
     
     Answered

    Have $/MACWebProject/References created in souce control manually then in the build template, add copy task to copy the dll from drop folder to Refefrences folder after the solution is build. Also make sure that the project file reference it from same path.

    • Marked As Answer by Terrence_ Wednesday, August 29, 2012 4:56 PM
    •  
  • Wednesday, August 22, 2012 3:57 PM
     
     

    So you are saying after the build have it copy the dlls to the reference folder.

    I understand this.

    I still don't understand how to path out to the reference folder in the arguments line.

    Considered "$/MACWebProject/References\DDay.iCal.dll", but it didn't exist.

    This file exists in the reference folder, but the build server didn't find it, it must be my path is inaccurate.


    Thanks, Terrence

  • Thursday, August 23, 2012 2:53 PM
    Owner
     
     

    First your workspace get should include this path so in build def - workspace make sure you have that path included. You don't need to add anything in the msargument

    In the project file, use relative path for eg

    if ref path is $/MACWebProject/References\DDay.iCal.dll and

    project path $/MACWebProject/aaa\bbb\a.csproj

    so in csproj you should add the reference using relative path ..\..\References\DDay.iCal.dll

  • Thursday, August 23, 2012 7:37 PM
     
     

    For what it's worth, we offer some basic guidance on checking in "third-party" (using the term a bit loosely here) binaries here: http://msdn.microsoft.com/en-us/library/ms245454#third_party_binaries.