{"id":2013,"date":"2007-08-15T23:02:03","date_gmt":"2007-08-15T23:02:03","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2007\/08\/15\/tfs-2008-calling-custom-targets-and-documentation-for-the-beta-2-object-model\/"},"modified":"2007-08-15T23:02:03","modified_gmt":"2007-08-15T23:02:03","slug":"tfs-2008-calling-custom-targets-and-documentation-for-the-beta-2-object-model","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/tfs-2008-calling-custom-targets-and-documentation-for-the-beta-2-object-model\/","title":{"rendered":"TFS 2008: Calling custom targets and documentation for the beta 2 object model"},"content":{"rendered":"<p><a href=\"http:\/\/blogs.msdn.com\/aaronhallberg\/\">Aaron Hallberg<\/a> has a written a great post on one of the new extensibility mechanisms we&#8217;ve added to the Microsoft.TeamFoundation.Build.targets file that forms the backbone of the msbuild process (it&#8217;s imported by every tfsbuild.proj file and contains all of the targets and properties).&nbsp; Aaron shows you how to have a different target called for each of the projects and solutions that you build, which allows for greater flexibility in hour your projects and solutions are built.<\/p>\n<blockquote>\n<p><a href=\"http:\/\/blogs.msdn.com\/aaronhallberg\/archive\/2007\/08\/07\/calling-custom-targets-within-team-build.aspx\">Calling Custom Targets Within Team Build<\/a><\/p>\n<\/blockquote>\n<blockquote>\n<p>In Team Build v1 (VSTF 2005), the CoreCompile target always invoked the <em>Build<\/em> target of the solutions specified in the <em>SolutionToBuild<\/em> item group within your TfsBuild.proj file.&nbsp; To support <em><a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/t71a733d(vs.80).aspx\">ClickOnce<\/a><\/em> deployment, an additional item group called <em>SolutionToPublish<\/em> was supported &#8211; all solutions specified in <em>this<\/em> item group had their <em>Publish<\/em> targets invoked instead of their <em>Build<\/em> targets.&nbsp; Team Build Orcas (VSTF 2008) generalizes this and allows custom targets to be specified for each solution in the <em>SolutionToBuild<\/em> item group (along with custom properties).&nbsp; <\/p>\n<pre>      &lt;SolutionToBuild Include=\"$(BuildProjectFolderPath)\/path\/MyClickOnceSolution.sln\"&gt;\n        &lt;Targets&gt;Publish&lt;\/Targets&gt;\n      &lt;\/SolutionToBuild&gt;\n      &lt;SolutionToBuild Include=\"$(BuildProjectFolderPath)\/path\/MyStandardSolution.sln\"&gt;\n        &lt;!-- &lt;Targets&gt;Build&lt;\/Targets&gt; --&gt;\n      &lt;\/SolutionToBuild&gt;\n      &lt;SolutionToBuild Include=\"$(BuildProjectFolderPath)\/path\/MyCustomProject.proj\"&gt;\n        &lt;Targets&gt;SomeTarget;SomeOtherTarget&lt;\/Targets&gt;\n      &lt;\/SolutionToBuild&gt;<\/pre>\n<p><a href=\"http:\/\/blogs.msdn.com\/aaronhallberg\/archive\/2007\/08\/07\/calling-custom-targets-within-team-build.aspx\">more&#8230;<\/a><\/p><\/blockquote>\n<p>By the way, even though the word &#8220;solution&#8221; appears in the name &#8220;SolutionToBuild,&#8221; you can specify project files as well (e.g., foo.csproj).&nbsp; It doesn&#8217;t have to be a solution (we&#8217;ve kept the name &#8220;SolutionToBuild&#8221;&nbsp;from v1 for compatibility and because &#8220;SolutionOrProjectToBuild&#8221; just seemed like overkill).<\/p>\n<p>Aaron has also posted a new CHM file that contains the documentation for the Orcas beta 2 Team Build object model: <a href=\"http:\/\/blogs.msdn.com\/aaronhallberg\/archive\/2007\/08\/14\/orcas-beta-2-object-model-documentation.aspx\">Orcas Beta 2 Object Model Documentation<\/a>.&nbsp; If you want to use the new API, you&#8217;ll want this documentation file.<\/p>\n<div class=\"wlWriterSmartContent\" id=\"0767317B-992E-4b12-91E0-4F059A8CECA8:a51441ba-76ed-441c-b83d-7deb7d4686e2\" style=\"padding-right: 0px;padding-left: 0px;padding-bottom: 0px;margin: 0px;padding-top: 0px\">Technorati tags: <a href=\"http:\/\/technorati.com\/tags\/tfs%202008\" rel=\"tag\">tfs 2008<\/a>, <a href=\"http:\/\/technorati.com\/tags\/team%20foundation\" rel=\"tag\">team foundation<\/a>, <a href=\"http:\/\/technorati.com\/tags\/team%20build\" rel=\"tag\">team build<\/a>, <a href=\"http:\/\/technorati.com\/tags\/msbuild\" rel=\"tag\">msbuild<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Aaron Hallberg has a written a great post on one of the new extensibility mechanisms we&#8217;ve added to the Microsoft.TeamFoundation.Build.targets file that forms the backbone of the msbuild process (it&#8217;s imported by every tfsbuild.proj file and contains all of the targets and properties).&nbsp; Aaron shows you how to have a different target called for each [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[7,8,15],"class_list":["post-2013","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-team-build","tag-team-foundation","tag-tfs-api"],"acf":[],"blog_post_summary":"<p>Aaron Hallberg has a written a great post on one of the new extensibility mechanisms we&#8217;ve added to the Microsoft.TeamFoundation.Build.targets file that forms the backbone of the msbuild process (it&#8217;s imported by every tfsbuild.proj file and contains all of the targets and properties).&nbsp; Aaron shows you how to have a different target called for each [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/2013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=2013"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/2013\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=2013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=2013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=2013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}