While setting up a continuous integration (CI) build in CruiseControl.NET on a project checked into Team Foundation Server (TFS) I had to make several “adjustments” to get the build working properly. This post documents the errors and what I did to get a successful build.
First, in VS.NET 2010 I created a simple WPF test project and checked it into TFS. Next, updated my CCNET server to v1.5 (v1.5.72256.1 to be exact) and edited the ccnet.config file to point to my project which looks like:
<sourcecontrol type="vsts" autoGetSource="true" applyLabel="true">
<project>$/CI WPF Test</project>
<modificationHistory onlyLogWhenChangesFound="true" />
At that point I fired up the CCNet server from the command line and hit the Web Dashboard to force a build of the project which resulted in the error “Team Foundation Server myserver-tfs does not exist or is not accessible at this time.
Technical information (for administrator)
The request failed with HTTP status 404: Not found”
The problem was the <server> tag from the ccnet.config file was missing part of the URL which should have included “/tfs” on the end. My bad.
After correcting the server URL I ran into the next error “TFS30063: You are not authorized to access http://myserver-tfs:8080/tfs.” A bit of research and I found this issue in the CCENT Jira bug database regarding a bug (and patch) for an issue in CCNET’s VS TFS source control plugin. My search also lead me to a post titled CCNET 1.5 and TFS 2010 Integration that mentions the same problem with a workaround which is to run the CCNET server under the account that has access to the TFS server.
I fired up a new console window using my TFS account credentials with the runas.exe command as follows:
C:\Windows\System32\runas.exe /netonly /user:MYDOMAIN\STrefethen cmd.exe
I then updated my ccnet.config file removing the <username> and <password> settings from the <sourcecontrol> block. After forcing yet another build the next problem I encountered read:
“Team Foundation Server http://myserver-tfs:8080/tfs does not exist or is not accessible at this time. Technical Information (for administrator):
Team Foundation services are not available from the server.
Technical Information (for administrator):
TF253022: You must update your client with the Forward Compatibility Update in order to connect to the Team Foundation Server that you selected. To obtain this update, go to the Microsoft Web site: http://go.microsoft.com/fwlink/?LinkID=166481”
Here are more explicit details of that update:
Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer)
After downloading and installing the update then forcing yet another build all is now working:
Hope this helps you in the event you’ve run into similar problems.