CC.Net will quite happily work with TFS but you'll need to install a plugin and the Microsoft Visual Studio Team Explorer client which will install the assemblies necessary to make the TFS CC.Net plugin work.
So lets download the software to make this work:
- Extract the contents of the CC.Net Plugin to a temp directory
- Copy the ccnet.vsts.plugin.dll assembly into the server directory for CCNET (%programfiles%\CruiseControl.NET\server).
- Install Visual Studio Team System 2008 Team Explorer
Configure ccnet.config project
Here's an example of the configuration I'm using:
<sourcecontrol type="filtered">
<sourceControlProvider type="vsts" autoGetSource="true" applyLabel="true">
<server>http://server:8080</server>
<username>build.server</username>
<password>buildy</password>
<domain>QWERTY</domain>
<project>$/App/Lib</project>
<workingDirectory>C:\Builds\App</workingDirectory>
<workspace>[SERVER_NAME]</workspace>
<deleteWorkspace>false</deleteWorkspace>
</sourceControlProvider>
<exclusionFilters>
<userFilter>
<names>
<name>admin</name>
</names>
</userFilter>
</exclusionFilters>
</sourcecontrol>
Troubleshooting
You receive the following in CC.NET:
Microsoft.TeamFoundation.VersionControl.Client.WorkspaceExistsException: The workspace CCNET ...
Make sure you add the workspace setttings, I use the server name to avoid any potential conflicts in the workspace. For example where I'm working now they use the same domain user for all build servers, incidentally My Documents are mapped to a shared network drive as well. In this case if we all used CCNET there'd be a problem, as I found out (the hard way)!
<workspace>[SERVER_NAME]</workspace>
<deleteWorkspace>false</deleteWorkspace>
Perform a TF action from the command line
- Ensure that the global path variable contains c:\program files\Microsoft Visual Studio 9.0\Common7\IDE
- Shell out to the command line and type in TF workspaces, you should get a list of available TFS workspaces, if CCNET has been running your'll see items with a comment of "Temporary CruideControl.NET"
daa5fcb5-4fd9-4766-a8bc-8a239d3b28e2|1|5.0