{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1015","labels_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1015/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1015/comments","events_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1015/events","html_url":"https://github.com/Microsoft/vso-agent-tasks/issues/1015","id":123994146,"number":1015,"title":"Hidden \"Getting source\"-task runs too soon.","user":{"login":"januskh","id":114855,"avatar_url":"https://avatars.githubusercontent.com/u/114855?v=3","gravatar_id":"","url":"https://api.github.com/users/januskh","html_url":"https://github.com/januskh","followers_url":"https://api.github.com/users/januskh/followers","following_url":"https://api.github.com/users/januskh/following{/other_user}","gists_url":"https://api.github.com/users/januskh/gists{/gist_id}","starred_url":"https://api.github.com/users/januskh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/januskh/subscriptions","organizations_url":"https://api.github.com/users/januskh/orgs","repos_url":"https://api.github.com/users/januskh/repos","events_url":"https://api.github.com/users/januskh/events{/privacy}","received_events_url":"https://api.github.com/users/januskh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-27T19:51:49Z","updated_at":"2015-12-28T16:27:50Z","closed_at":null,"body":"In my senario, I would like to make some final changes in the build process. I have written a powershell script that can increase the revision-version of the assemblyinfo, and also download and update dependencies from the dropzone. (Running local agent, not hosted).\r\n\r\nBut... when I start a build, the first thing that happens, is that the Agent runs a (hidden) task before everything else, where it gets the source. \"Getting source\".\r\n\r\nI have a workspace on the local-buildserver, where I am changing the assemblyinfo and updating the dependencies there, and afterwards checking-in the changes. But these changes are not applied to the build (before next build), since the source is already downloaded to the build-agents workarea. (first thing by the agent).\r\n\r\nIs there somehow I can trigger the event of getting the source (again)? Or would it be possible to merge the (hidden) \"Getting source\"-task to the build-task or maybe postpone it to run after my script?\r\n\r\nI hope you understand my question.. thank you. (Keep up the good work!)"},"comment":{"url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/comments/167599113","html_url":"https://github.com/Microsoft/vso-agent-tasks/issues/1015#issuecomment-167599113","issue_url":"https://api.github.com/repos/Microsoft/vso-agent-tasks/issues/1015","id":167599113,"user":{"login":"ericsciple","id":12102068,"avatar_url":"https://avatars.githubusercontent.com/u/12102068?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsciple","html_url":"https://github.com/ericsciple","followers_url":"https://api.github.com/users/ericsciple/followers","following_url":"https://api.github.com/users/ericsciple/following{/other_user}","gists_url":"https://api.github.com/users/ericsciple/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsciple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsciple/subscriptions","organizations_url":"https://api.github.com/users/ericsciple/orgs","repos_url":"https://api.github.com/users/ericsciple/repos","events_url":"https://api.github.com/users/ericsciple/events{/privacy}","received_events_url":"https://api.github.com/users/ericsciple/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T16:27:50Z","updated_at":"2015-12-28T16:27:50Z","body":"@januskh if i understand the scenario correctly, the second build is already queued (same definition, same agent) before the first build finishes. Correct?\r\n\r\nIf that's the case, then the problem is that the second build has been queued *against a particular changeset*.\r\n\r\nIf you want to really get at the point in time when the build runs (not when it was queued), you could run a batch script as the first step of your build.\r\n```\r\nCD /d \"%Build_SourcesDirectory%\"\r\n\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\TF.exe\" get * /r\r\n```\r\n\r\nDoes that workaround your issue?"}}