Ask a questionAsk a question
 

AnswerCopy file not from solution but from TFS root project

  • Friday, November 06, 2009 1:45 PMcosmos38240 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    I want to copy a file which is under the root path of the TFS Project but not in the solution.
    example :  $Project1 -> Deployment -> file1.ico
                     $Project1 -> Main -> Source -> project.sln

    In my custom TfsBuild.proj I have :

    <!--

     

    Create output for deployment purpose -->
    <
    Target Name="AfterCompile" Condition="'$(IsDesktopBuild)'!='true'"
    >
    <Message Text="Copy icon for deployment" Importance="high"
    />
    <
    Copy SourceFiles="$(BuildProjectFolderPath)/../../Deployment/file1.ico" DestinationFolder="$(OutDir)\Deployment\"
    />

    But it is not working :

     

     

    Could not find a part of the path '$/Project1/TeamBuildTypes/Main/../../Deployment/file1.ico".


    Thank you for your help
    Regards,
    Michaël

Answers

  • Friday, November 06, 2009 3:04 PMOsirisJakob Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Michael,

    For the copy operation to work,it doesn't reallyt matter if the file(s) belongs to a solution or not. What's important is that they are included in the workspace of your build definition. Only files located within that workspace will be downloaded to the build server as part of the build.

    So, make sure that you have included the Deployment folder in your workspace

    Regards
    /Jakob


    Blog: http://geekswithblogs.net/jakob Twitter: http://twitter.com/osirisjakob
    • Marked As Answer bycosmos38240 Friday, November 06, 2009 3:56 PM
    •  

All Replies

  • Friday, November 06, 2009 3:04 PMOsirisJakob Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Michael,

    For the copy operation to work,it doesn't reallyt matter if the file(s) belongs to a solution or not. What's important is that they are included in the workspace of your build definition. Only files located within that workspace will be downloaded to the build server as part of the build.

    So, make sure that you have included the Deployment folder in your workspace

    Regards
    /Jakob


    Blog: http://geekswithblogs.net/jakob Twitter: http://twitter.com/osirisjakob
    • Marked As Answer bycosmos38240 Friday, November 06, 2009 3:56 PM
    •  
  • Friday, November 06, 2009 3:56 PMcosmos38240 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Jakob,

    Thank you very much, I understand now :)


    Regards,
    Michaël