Thursday, 15 September 2011

tfs - TFSBuild.proj import common targets after getting from source control -


I am currently writing / cleaning our TFS build, and I have seen that we have many duplication Are there. I was wishing to create a "normal targets" file, which makes all our TFS (approximately 30), imports.

I have tried some things with these things:

   & Lt; Import Project = "$ (Build Definition) .proj" /> & Lt; PropertyGroup & gt; & Lt; ProjectName & gt; Felix.LincsPublishingHandlers & lt; / ProjectName & gt; & Lt; / PropertyGroup & gt; & Lt; Import Project = "$ (Build Directory) /src/BuildScripts/Common/CommonTargets.targets" / & gt; & Lt; / Project & gt; Where  

Where:

  • $ (BuildDefinition) .proj -> Project / Environment specific properties (such as DB connection strings, IP addresses). >
  • CommonTargets.targets used in all different projects -> defined in the build definition> source setting
  • However, when I try to run on the TFS build agent (if any Need to know if version 2010), it tries to run the statement before copying source f Below the files, I get an error saying that the CommonTargets.targets file does not exist.

    I have seen a look around the web, and the solution I have completed so far is to use:

    • The same folder containing the TFSBuild.proj file Copy the Common.targets file in
      • I have 20+ different folders built in
      • I would like them to use a single common.targets file (a Only 20 copies of the file)
    • Target a common location. Build server (s) that use TFS build agents
      • I have to do the rest in control with the script and the source control.
      • As we are doing a type of migration project, mangoes. Titres will change for a short time, so the source will be best in control

    TFS source control is placed in a Common.targets file import Trying to do has come to any kind of issue

    Secondly, you should consider updating your build system to use a modern method. Use the TFS 2013 template and PowerShell.


No comments:

Post a Comment