title: Team City not able to fetch source code from TFS for build
body: <p>I know little about this, but it has fallen to be at work to look into. I know a really tiny bit about TFS, and a little less than that about Team City, but do have access to both.</p>
  
  <p>I have a Team City project that watches for commits to a TFS repo. When someone checks in files, TeamCity fetches them, then builds the project and publishes it via web deploy to our 'Dev' environment. This process is much less automated for higher grade environments like UAT etc.</p>
  
  <p>Now, suddenly about two weeks ago, someone changed something, and when do a build in TeamCity I get two error messages. The first seems more introductory, that there has been a problem:</p>
  
  <blockquote>
    <p>Failed to collect changes, error: Failed to get current version of TFS
    root. TF400324: Team Foundation services are not available from server
    applogix-projects.visualstudio.com\DefaultCollection. Technical
    information (for administrator): The remote name could not be
    resolved: 'applogix-projects.visualstudio.com'</p>
  </blockquote>
  
  <p>The second error message, displayed on the same screen as the first, is slightly more technical, and even includes a fairly verbose stack trace, which I will omit until clearly necessary. The 2nd message:</p>
  
  <blockquote>
    <p>Failed for the root '"Hollard - MLAM - Web" {instance id=4, parent
    internal id=1, parent id=HollardMlamWeb_HollardMlamWeb, description:
    "tfs: <a href="https://applogix-projects.visualstudio.com/DefaultCollection" rel="nofollow">https://applogix-projects.visualstudio.com/DefaultCollection</a>
    $/Hollard - MLAM/HollardMLAM/Hollard.MLAM"}: Failed to get current
    version of TFS root. TF400324: Team Foundation services are not
    available from server
    applogix-projects.visualstudio.com\DefaultCollection. Technical
    information (for administrator): The remote name could not be
    resolved: 'applogix-projects.visualstudio.com'</p>
  </blockquote>
  
  <p>Those remove names that cannot be resolved within Team City, e.g. <code>applogix-projects.visualstudio.com\DefaultCollection</code> resolves fine when I paste it into a browser, and it directs me to our Visual Studio Online location for the project.</p>
  
  <p>What I would appreciate as an answer here is an overview how the TFS fetch and TC build basically occur, and then some settings in TeamCity and or VS Online TFS that could be causing something like this.</p>
  
  <p>It might be worth noting that if I pull the 'official' publish profile for Dev, and manually straight from VS Publish wizard, the app builds OK is well deployed to the Dev environment.</p>