<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Jelle Druyts - Blog|Programming|TeamSystem</title>
    <link>http://jelle.druyts.net/</link>
    <description>Reflection.Emit()</description>
    <language>en-us</language>
    <copyright>Jelle Druyts</copyright>
    <lastBuildDate>Tue, 08 Jul 2008 19:57:07 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>blog@druyts.net</managingEditor>
    <webMaster>blog@druyts.net</webMaster>
    <item>
      <trackback:ping>http://jelle.druyts.net/Trackback.aspx?guid=727af7f7-b435-4fbd-b960-a725f8862f17</trackback:ping>
      <pingback:server>http://jelle.druyts.net/pingback.aspx</pingback:server>
      <pingback:target>http://jelle.druyts.net/PermaLink.aspx?guid=727af7f7-b435-4fbd-b960-a725f8862f17</pingback:target>
      <dc:creator>Jelle Druyts</dc:creator>
      <wfw:comment>http://jelle.druyts.net/CommentView.aspx?guid=727af7f7-b435-4fbd-b960-a725f8862f17</wfw:comment>
      <wfw:commentRss>http://jelle.druyts.net/SyndicationService.asmx/GetEntryCommentsRss?guid=727af7f7-b435-4fbd-b960-a725f8862f17</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've just published another update to my guide on <a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx">Setting
up Source Server for TFS Builds</a>, since the Debugging Tools for Windows now has
built-in support for Team Foundation Server. So that means: no more third party downloads
and an even simpler installation procedure! I've also updated the document to reflect
all applicable versions of the tools you'll be using: Visual Studio 2005 and 2008,
as well as Team Foundation Server 2005 and 2008.
</p>
        <p>
Because I have been troubleshooting Source Server issues a few times as well, I also
added a chapter on how to find out what's going on inside the Source Server indexing
and what might be going wrong. Note that there is some Perl going on in there, so
avert your eyes if you can't handle the look and feel of it (I know I can't) :-)
</p>
        <p>
For the full setup instructions, please refer to the original post on <a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx">Setting
up Source Server for TFS Builds</a>.
</p>
        <p>
Oh, and finally, my homie <a href="http://kinnie.blogspot.com/">Pieter</a> also posted
a more detailed guide on how to set <a href="http://kinnie.blogspot.com/2008/06/8-source-server-for-tfs-builds.html">Source
Server support up inside the Team Build script</a> - and what's more important, what
the invaluable benefit is of having a central reusable build script. Great job Pieter!
</p>
        <img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=727af7f7-b435-4fbd-b960-a725f8862f17" />
      </body>
      <title>Updated Again: Setting up Source Server for TFS Builds (v1.2)</title>
      <guid isPermaLink="false">http://jelle.druyts.net/PermaLink.aspx?guid=727af7f7-b435-4fbd-b960-a725f8862f17</guid>
      <link>http://jelle.druyts.net/2008/07/08/UpdatedAgainSettingUpSourceServerForTFSBuildsV12.aspx</link>
      <pubDate>Tue, 08 Jul 2008 19:57:07 GMT</pubDate>
      <description>&lt;p&gt;
I've just published another update to my guide on &lt;a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx"&gt;Setting
up Source Server for TFS Builds&lt;/a&gt;, since the Debugging Tools for Windows now has
built-in support for Team Foundation Server. So that means: no more third party downloads
and an even simpler installation procedure! I've also updated the document to reflect
all applicable versions of the tools you'll be using: Visual Studio 2005 and 2008,
as well as Team Foundation Server 2005 and 2008.
&lt;/p&gt;
&lt;p&gt;
Because I have been troubleshooting Source Server issues a few times as well, I also
added a chapter on how to find out what's going on inside the Source Server indexing
and what might be going wrong. Note that there is some Perl going on in there, so
avert your eyes if you can't handle the look and feel of it (I know I can't) :-)
&lt;/p&gt;
&lt;p&gt;
For the full setup instructions, please refer to the original post on &lt;a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx"&gt;Setting
up Source Server for TFS Builds&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Oh, and finally, my homie &lt;a href="http://kinnie.blogspot.com/"&gt;Pieter&lt;/a&gt; also posted
a more detailed guide on how to set &lt;a href="http://kinnie.blogspot.com/2008/06/8-source-server-for-tfs-builds.html"&gt;Source
Server support up inside the Team Build script&lt;/a&gt; - and what's more important, what
the invaluable benefit is of having a central reusable build script. Great job Pieter!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=727af7f7-b435-4fbd-b960-a725f8862f17" /&gt;</description>
      <comments>http://jelle.druyts.net/CommentView.aspx?guid=727af7f7-b435-4fbd-b960-a725f8862f17</comments>
      <category>Blog</category>
      <category>Blog/General</category>
      <category>Blog/Programming</category>
      <category>Blog/Programming/.NET</category>
      <category>Blog/Programming/.NET/VS.NET</category>
      <category>Blog/Programming/TeamSystem</category>
    </item>
    <item>
      <trackback:ping>http://jelle.druyts.net/Trackback.aspx?guid=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3</trackback:ping>
      <pingback:server>http://jelle.druyts.net/pingback.aspx</pingback:server>
      <pingback:target>http://jelle.druyts.net/PermaLink.aspx?guid=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3</pingback:target>
      <dc:creator>Jelle Druyts</dc:creator>
      <wfw:comment>http://jelle.druyts.net/CommentView.aspx?guid=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3</wfw:comment>
      <wfw:commentRss>http://jelle.druyts.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a quick note to let you know that I've updated my guide on <a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx">Setting
up Source Server for TFS Builds</a>, since I just found out that there is an issue
with Build Definitions that contain spaces. The fix is fairly easy though:
</p>
        <ul>
          <li>
In TFIndex.cmd (on the build server), remove the quotes around the <code>%1</code> argument
for SYMBOLS: 
</li>
        </ul>
        <pre>
          <strike>@call "%~dp0SSIndex.cmd" -SYSTEM=TF -SYMBOLS="%1" %*</strike> @call "%~dp0SSIndex.cmd"
-SYSTEM=TF -SYMBOLS=%1 %*</pre>
        <ul>
          <li>
In the Team Build Script (in Source Control), add XML-escaped quotes around the <code>$(BinariesRoot)</code> argument: 
</li>
        </ul>
        <pre>
          <strike>&lt;Exec Command="&amp;quot;C:\Program Files\Debugging Tools for Windows\sdk\srcsrv\TFIndex.cmd&amp;quot;
$(BinariesRoot)"<br />
      WorkingDirectory="$(SolutionRoot)" /&gt;</strike> &lt;Exec
Command="&amp;quot;C:\Program Files\Debugging Tools for Windows\sdk\srcsrv\TFIndex.cmd&amp;quot;
&amp;quot;$(BinariesRoot)&amp;quot;"<br />
      WorkingDirectory="$(SolutionRoot)" /&gt;</pre>
        <p>
For the full setup instructions, please refer to the original post on <a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx">Setting
up Source Server for TFS Builds</a>.
</p>
        <img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3" />
      </body>
      <title>Updated: Setting up Source Server for TFS Builds</title>
      <guid isPermaLink="false">http://jelle.druyts.net/PermaLink.aspx?guid=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3</guid>
      <link>http://jelle.druyts.net/2008/04/30/UpdatedSettingUpSourceServerForTFSBuilds.aspx</link>
      <pubDate>Wed, 30 Apr 2008 10:20:47 GMT</pubDate>
      <description>&lt;p&gt;
Just a quick note to let you know that I've updated my guide on &lt;a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx"&gt;Setting
up Source Server for TFS Builds&lt;/a&gt;, since I just found out that there is an issue
with Build Definitions that contain spaces. The fix is fairly easy though:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
In TFIndex.cmd (on the build server), remove the quotes around the &lt;code&gt;%1&lt;/code&gt; argument
for SYMBOLS: 
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;strike&gt;@call "%~dp0SSIndex.cmd" -SYSTEM=TF -SYMBOLS="%1" %*&lt;/strike&gt; @call "%~dp0SSIndex.cmd"
-SYSTEM=TF -SYMBOLS=%1 %*&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;
In the Team Build Script (in Source Control), add XML-escaped quotes around the &lt;code&gt;$(BinariesRoot)&lt;/code&gt; argument: 
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;strike&gt;&amp;lt;Exec Command="&amp;amp;quot;C:\Program Files\Debugging Tools for Windows\sdk\srcsrv\TFIndex.cmd&amp;amp;quot;
$(BinariesRoot)"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkingDirectory="$(SolutionRoot)" /&amp;gt;&lt;/strike&gt; &amp;lt;Exec
Command="&amp;amp;quot;C:\Program Files\Debugging Tools for Windows\sdk\srcsrv\TFIndex.cmd&amp;amp;quot;
&amp;amp;quot;$(BinariesRoot)&amp;amp;quot;"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkingDirectory="$(SolutionRoot)" /&amp;gt;&lt;/pre&gt;
&lt;p&gt;
For the full setup instructions, please refer to the original post on &lt;a href="http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx"&gt;Setting
up Source Server for TFS Builds&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3" /&gt;</description>
      <comments>http://jelle.druyts.net/CommentView.aspx?guid=6724aea2-53bc-46d2-ac1d-bb5b241bd7e3</comments>
      <category>Blog</category>
      <category>Blog/Programming</category>
      <category>Blog/Programming/.NET</category>
      <category>Blog/Programming/.NET/VS.NET</category>
      <category>Blog/Programming/TeamSystem</category>
    </item>
    <item>
      <trackback:ping>http://jelle.druyts.net/Trackback.aspx?guid=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6</trackback:ping>
      <pingback:server>http://jelle.druyts.net/pingback.aspx</pingback:server>
      <pingback:target>http://jelle.druyts.net/PermaLink.aspx?guid=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6</pingback:target>
      <dc:creator>Jelle Druyts</dc:creator>
      <wfw:comment>http://jelle.druyts.net/CommentView.aspx?guid=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6</wfw:comment>
      <wfw:commentRss>http://jelle.druyts.net/SyndicationService.asmx/GetEntryCommentsRss?guid=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>[<a href="http://jelle.druyts.net/2008/04/30/UpdatedSettingUpSourceServerForTFSBuilds.aspx">Update
30/04/2008</a>] Fixed issue for Build Definition names that contain spaces.</em>
        </p>
        <p>
          <em>[<a href="http://jelle.druyts.net/2008/07/08/UpdatedAgainSettingUpSourceServerForTFSBuildsV12.aspx">Update
08/07/2008</a>] Updated for new version of Debugging Tools for Windows; added Troubleshooting
chapter.</em>
        </p>
        <p>
          <em>[Update 05/08/2008] Updated "srcsrv.ini" file contents for new version of Source
Server script (does not include cmd.exe anymore).</em>
        </p>
        <p>
          <em>[Update 20/03/2009] Added troubleshooting part for "Illegal characters in path"
error.</em>
        </p>
        <p>
          <em>[Update 30/03/2009] Updated "Illegal characters in path" patch to also include
the srcsrv.dll file (in addition to symsrv.dll). </em>
        </p>
        <p>
I've read about <a href="http://msdn.microsoft.com/msdnmag/issues/06/08/UseTheSource/default.aspx">symbol
servers and source servers</a> before (in John Robbins' excellent <a href="http://www.amazon.com/gp/product/0735622027/ref=s9_asin_title_1/104-9346732-5442324?pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_s=center-2&amp;pf_rd_r=1VKRMDTB9NWV2YBQRDWA&amp;pf_rd_t=101&amp;pf_rd_p=278240301&amp;pf_rd_i=507846">Debugging
Microsoft .NET 2.0 Applications</a> book, for example, and also due to the recent
news that <a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx">Visual
Studio 2008 will support source-code debugging of the .NET Framework Libraries</a>),
but never really got around to trying them out since they seemed pretty complex to
set up. However, I've recently set up a source server on a Team Foundation build server
(twice!), and my eyes have now gone wide open: anybody who references assemblies built
by those TFS build servers can now seamlessly debug them.
</p>
        <p>
When an assembly is "source server-enabled", the pdb file will contain the <strong>full
path </strong>and the <strong>exact version </strong>of the file <strong>in source
control </strong>that was used to build that assembly. If the debugger then enters
a method, Visual Studio automatically downloads that correct file, places it in a
local cache, and opens it for debugging. This is super sweet!
</p>
        <p>
Now the hard work is already done and available in the Debugging Tools for Windows,
but there are some extra steps to take if you want to integrate this in a real Team
Build (i.e. on the TFS build server instead of on a local machine) and it also lacks
some additional information to get everything working. So I put together a full document
that covers all aspects of setting up a source server, modifying the Team Build script,
configuring the project files, and finally configuring the development machines.
</p>
        <p>
The full document (PDF) can be downloaded here, and you can read the one-page summary
that briefly covers the required steps below. I cannot recommend setting up a source
server enough, it's free and takes less than an hour if you simply follow the procedure,
and the advantages are - hopefully - obvious.
</p>
        <p>
          <a href="http://jelle.druyts.net/content/binary/Setting%20up%20Source%20Server%20for%20TFS%20Builds.pdf">Setting
up Source Server for TFS Builds.pdf (0,98 MB)</a>
        </p>
        <p>
Note that this procedure works for both TFS 2005 as TFS 2008, and both VS 2005 as
VS 2008.
</p>
        <p>
          <strong>Installing Source Server on the Build Server</strong>
        </p>
        <ul>
          <li>
Install the <a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx">Debugging
Tools for Windows</a> (at least the "Source Server" component) 
</li>
          <li>
Install Perl (e.g. <a href="http://www.activestate.com/Products/activeperl/">ActivePerl</a>) 
</li>
          <li>
In the tfsindex.cmd file in the Debugging Tools for Windows directory, change the
last line to</li>
        </ul>
        <pre>@call "%~dp0SSIndex.cmd" -SYSTEM=TFS <b>-SYMBOLS=%1</b> %*</pre>
        <ul>
          <li>
In the srcsrv.ini file in that directory, set MYSERVER to the exact URL of your Team
Foundation Server (Application Tier) 
</li>
          <li>
Add the full path to TF.exe (usually "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE"
for VS 2005 or "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" for VS 2008)
to the system's Path environment variable 
</li>
          <li>
Restart the "Team Build Service" (for TFS 2005) or "Visual Studio Team Foundation
Build" (for TFS 2008) Windows service</li>
        </ul>
        <b>Enabling Source Server in the Team Build Script</b>
        <ul>
          <li>
Add a new target to TFSBuild.proj to be run on "AfterCompile" that calls tfsindex.cmd:</li>
        </ul>
        <pre>&lt;Target Name="RunSourceServerIndexing"&gt;<br />
&lt;Exec Command="&amp;quot;C:\Program Files\Debugging Tools for Windows (x86)\srcsrv\tfsindex.cmd&amp;quot;
&amp;quot;$(BinariesRoot)&amp;quot;"<br />
        WorkingDirectory="$(SolutionRoot)" /&gt;
&lt;/Target&gt; &lt;Target Name="AfterCompile"<br />
        DependsOnTargets="RunSourceServerIndexing"
/&gt;</pre>
        <b>Configuring the Project Files</b>
        <ul>
          <li>
Set the Debug Info in Project Properties / Build / Advanced to "full" (Debug configuration)
or "pdb-only" (Release configuration)</li>
        </ul>
        <b>Configuring the Development Machines</b>
        <ul>
          <li>
In Visual Studio / Tools / Options / Debugging / General: check the "Enable source
server support" checkbox 
</li>
          <li>
Create a new text file named srcsrv.ini in the Visual Studio directory (usually "C:\Program
Files\Microsoft Visual Studio 8\Common7\IDE" for VS 2005 or "C:\Program Files\Microsoft
Visual Studio 9.0\Common7\IDE" for VS 2008) that contains the exact following text:</li>
        </ul>
        <pre>[trusted commands] 
TF.exe view</pre>
        <img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6" />
      </body>
      <title>Setting up Source Server for TFS Builds</title>
      <guid isPermaLink="false">http://jelle.druyts.net/PermaLink.aspx?guid=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6</guid>
      <link>http://jelle.druyts.net/2007/12/09/SettingUpSourceServerForTFSBuilds.aspx</link>
      <pubDate>Sun, 09 Dec 2007 18:16:12 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;[&lt;a href="http://jelle.druyts.net/2008/04/30/UpdatedSettingUpSourceServerForTFSBuilds.aspx"&gt;Update
30/04/2008&lt;/a&gt;] Fixed issue for Build Definition names that contain spaces.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;[&lt;a href="http://jelle.druyts.net/2008/07/08/UpdatedAgainSettingUpSourceServerForTFSBuildsV12.aspx"&gt;Update
08/07/2008&lt;/a&gt;] Updated for new version of Debugging Tools for Windows; added Troubleshooting
chapter.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;[Update 05/08/2008&gt;] Updated "srcsrv.ini" file contents for new version of Source
Server script (does not include cmd.exe anymore).&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;[Update 20/03/2009&gt;] Added troubleshooting part for "Illegal characters in path"
error.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;[Update 30/03/2009&gt;] Updated "Illegal characters in path" patch to also include
the srcsrv.dll file (in addition to symsrv.dll). &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
I've read about &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/08/UseTheSource/default.aspx"&gt;symbol
servers and source servers&lt;/a&gt; before (in John Robbins' excellent &lt;a href="http://www.amazon.com/gp/product/0735622027/ref=s9_asin_title_1/104-9346732-5442324?pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_s=center-2&amp;amp;pf_rd_r=1VKRMDTB9NWV2YBQRDWA&amp;amp;pf_rd_t=101&amp;amp;pf_rd_p=278240301&amp;amp;pf_rd_i=507846"&gt;Debugging
Microsoft .NET 2.0 Applications&lt;/a&gt; book, for example, and also due to the recent
news that &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;Visual
Studio 2008 will support source-code debugging of the .NET Framework Libraries&lt;/a&gt;),
but never really got around to trying them out since they seemed pretty complex to
set up. However, I've recently set up a source server on a Team Foundation build server
(twice!), and my eyes have now gone wide open: anybody who references assemblies built
by those TFS build servers can now seamlessly debug them.
&lt;/p&gt;
&lt;p&gt;
When an assembly is "source server-enabled", the pdb file will contain the &lt;strong&gt;full
path &lt;/strong&gt;and the &lt;strong&gt;exact version &lt;/strong&gt;of the file &lt;strong&gt;in source
control &lt;/strong&gt;that was used to build that assembly. If the debugger then enters
a method, Visual Studio automatically downloads that correct file, places it in a
local cache, and opens it for debugging. This is super sweet!
&lt;/p&gt;
&lt;p&gt;
Now the hard work is already done and available in the Debugging Tools for Windows,
but there are some extra steps to take if you want to integrate this in a real Team
Build (i.e. on the TFS build server instead of on a local machine) and it also lacks
some additional information to get everything working. So I put together a full document
that covers all aspects of setting up a source server, modifying the Team Build script,
configuring the project files, and finally configuring the development machines.
&lt;/p&gt;
&lt;p&gt;
The full document (PDF) can be downloaded here, and you can read the one-page summary
that briefly covers the required steps below. I cannot recommend setting up a source
server enough, it's free and takes less than an hour if you simply follow the procedure,
and the advantages are - hopefully - obvious.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://jelle.druyts.net/content/binary/Setting%20up%20Source%20Server%20for%20TFS%20Builds.pdf"&gt;Setting
up Source Server for TFS Builds.pdf (0,98 MB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Note that this procedure works for both TFS 2005 as TFS 2008, and both VS 2005 as
VS 2008.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Installing Source Server on the Build Server&lt;/strong&gt; 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Install the &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;Debugging
Tools for Windows&lt;/a&gt; (at least the "Source Server" component) 
&lt;li&gt;
Install Perl (e.g. &lt;a href="http://www.activestate.com/Products/activeperl/"&gt;ActivePerl&lt;/a&gt;) 
&lt;li&gt;
In the tfsindex.cmd file in the Debugging Tools for Windows directory, change the
last line to&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;@call "%~dp0SSIndex.cmd" -SYSTEM=TFS &lt;b&gt;-SYMBOLS=%1&lt;/b&gt; %*&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;
In the srcsrv.ini file in that directory, set MYSERVER to the exact URL of your Team
Foundation Server (Application Tier) 
&lt;li&gt;
Add the full path to TF.exe (usually "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE"
for VS 2005 or "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" for VS 2008)
to the system's Path environment variable 
&lt;li&gt;
Restart the "Team Build Service" (for TFS 2005) or "Visual Studio Team Foundation
Build" (for TFS 2008) Windows service&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Enabling Source Server in the Team Build Script&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Add a new target to TFSBuild.proj to be run on "AfterCompile" that calls tfsindex.cmd:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&amp;lt;Target Name="RunSourceServerIndexing"&amp;gt;&lt;br&gt;
&amp;lt;Exec Command="&amp;amp;quot;C:\Program Files\Debugging Tools for Windows (x86)\srcsrv\tfsindex.cmd&amp;amp;quot;
&amp;amp;quot;$(BinariesRoot)&amp;amp;quot;"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WorkingDirectory="$(SolutionRoot)" /&amp;gt;
&amp;lt;/Target&amp;gt; &amp;lt;Target Name="AfterCompile"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DependsOnTargets="RunSourceServerIndexing"
/&amp;gt;&lt;/pre&gt;
&lt;b&gt;Configuring the Project Files&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Set the Debug Info in Project Properties / Build / Advanced to "full" (Debug configuration)
or "pdb-only" (Release configuration)&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Configuring the Development Machines&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
In Visual Studio / Tools / Options / Debugging / General: check the "Enable source
server support" checkbox 
&lt;li&gt;
Create a new text file named srcsrv.ini in the Visual Studio directory (usually "C:\Program
Files\Microsoft Visual Studio 8\Common7\IDE" for VS 2005 or "C:\Program Files\Microsoft
Visual Studio 9.0\Common7\IDE" for VS 2008) that contains the exact following text:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;[trusted commands] 
TF.exe view&lt;/pre&gt;
&lt;img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6" /&gt;</description>
      <comments>http://jelle.druyts.net/CommentView.aspx?guid=64a4eff4-55d5-4669-a7bc-ebe1dcd591a6</comments>
      <category>Blog</category>
      <category>Blog/Programming</category>
      <category>Blog/Programming/.NET</category>
      <category>Blog/Programming/.NET/VS.NET</category>
      <category>Blog/Programming/TeamSystem</category>
    </item>
    <item>
      <trackback:ping>http://jelle.druyts.net/Trackback.aspx?guid=14f1ed72-a709-4c6a-a2cb-199fd5c3700a</trackback:ping>
      <pingback:server>http://jelle.druyts.net/pingback.aspx</pingback:server>
      <pingback:target>http://jelle.druyts.net/PermaLink.aspx?guid=14f1ed72-a709-4c6a-a2cb-199fd5c3700a</pingback:target>
      <dc:creator>Jelle Druyts</dc:creator>
      <wfw:comment>http://jelle.druyts.net/CommentView.aspx?guid=14f1ed72-a709-4c6a-a2cb-199fd5c3700a</wfw:comment>
      <wfw:commentRss>http://jelle.druyts.net/SyndicationService.asmx/GetEntryCommentsRss?guid=14f1ed72-a709-4c6a-a2cb-199fd5c3700a</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I was having some trouble the other day with our Team Build server when building a
project that is used by an open Visual Studio instance.
</p>
        <p>
Our setup is that we build our enterprise framework on the build server and then copy
it to a public share so it can be used by the client projects. Now when somebody is
actively developing a project in Visual Studio that <em>uses</em> this enterprise
framework, we receive something like the following error in the build log when building
the framework:
</p>
        <pre>Copying drop to final destination
Copying folder "\\BuildServer\Drop\Framework_20060530.2\Release" to "D:\PublicShare\References\EnterpriseFramework\Latest".
D:\Build\Team\EnterpriseFramework\BuildType\TFSBuild.proj(168,5): error : A task error has occured.
D:\Build\Team\EnterpriseFramework\BuildType\TFSBuild.proj(168,5): error : Message = Access to the path 'D:\PublicShare\References\EnterpriseFramework\Latest\EnterpriseFramework.Common.xml' is denied.</pre>
        <p>
So the open Visual Studio instance on the developer's pc seems to keep a lock on the
XML file (for IntelliSense) on the build server, causing the build to fail. Now I
don't think it's very nice of Visual Studio that it locks the file, but apparently
that's the way it is.
</p>
        <p>
So here is the unclean (you won't catch me calling anything I do 'dirty' of course)
workaround I used to get rid of this sticky problem. In the build script, right before
copying the files to the public share, I execute the following task:
</p>
        <pre>&lt;Exec Command="net session /delete /y" /&gt;</pre>
        <p>
This simply forces a delete of all connected client sessions, closing all the handles
of the files that are opened remotely. Problem solved - as long as we don't have the
race condition where somebody would lock another XML file just between that command
and the actual copy, but what are the odds... The only minor side effect is that the
opened Visual Studio instance loses IntelliSense for some of the files it had locked,
but we can live with that. At least it's better than breaking the build, right?
</p>
        <img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=14f1ed72-a709-4c6a-a2cb-199fd5c3700a" />
      </body>
      <title>Closing locked files that break the Team Build</title>
      <guid isPermaLink="false">http://jelle.druyts.net/PermaLink.aspx?guid=14f1ed72-a709-4c6a-a2cb-199fd5c3700a</guid>
      <link>http://jelle.druyts.net/2006/05/30/ClosingLockedFilesThatBreakTheTeamBuild.aspx</link>
      <pubDate>Tue, 30 May 2006 18:37:36 GMT</pubDate>
      <description>&lt;p&gt;
I was having some trouble the other day with our Team Build server when building a
project that is used by an open Visual Studio instance.
&lt;/p&gt;
&lt;p&gt;
Our setup is that we build our enterprise framework on the build server and then copy
it to a public share so it can be used by the client projects. Now when somebody is
actively developing a project in Visual Studio that &lt;em&gt;uses&lt;/em&gt; this enterprise
framework, we receive something like the following error in the build log when building
the framework:
&lt;/p&gt;
&lt;pre&gt;Copying drop to final destination
Copying folder "\\BuildServer\Drop\Framework_20060530.2\Release" to "D:\PublicShare\References\EnterpriseFramework\Latest".
D:\Build\Team\EnterpriseFramework\BuildType\TFSBuild.proj(168,5): error : A task error has occured.
D:\Build\Team\EnterpriseFramework\BuildType\TFSBuild.proj(168,5): error : Message = Access to the path 'D:\PublicShare\References\EnterpriseFramework\Latest\EnterpriseFramework.Common.xml' is denied.&lt;/pre&gt;
&lt;p&gt;
So the open Visual Studio instance on the developer's pc seems to keep a lock on the
XML file (for IntelliSense) on the build server, causing the build to fail. Now I
don't think it's very nice of Visual Studio that it locks the file, but apparently
that's the way it is.
&lt;/p&gt;
&lt;p&gt;
So here is the unclean (you won't catch me calling anything I do 'dirty' of course)
workaround I used to get rid of this sticky problem. In the build script, right before
copying the files to the public share, I execute the following task:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;Exec Command="net session /delete /y" /&amp;gt;&lt;/pre&gt;
&lt;p&gt;
This simply forces a delete of all connected client sessions, closing all the handles
of the files that are opened remotely. Problem solved - as long as we don't have the
race condition where somebody would lock another XML file just between that command
and the actual copy, but what are the odds... The only minor side effect is that the
opened Visual Studio instance loses IntelliSense for some of the files it had locked,
but we can live with that. At least it's better than breaking the build, right?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://jelle.druyts.net/aggbug.ashx?id=14f1ed72-a709-4c6a-a2cb-199fd5c3700a" /&gt;</description>
      <comments>http://jelle.druyts.net/CommentView.aspx?guid=14f1ed72-a709-4c6a-a2cb-199fd5c3700a</comments>
      <category>Blog</category>
      <category>Blog/Programming</category>
      <category>Blog/Programming/.NET</category>
      <category>Blog/Programming/TeamSystem</category>
    </item>
  </channel>
</rss>