Setting up VCS parameters is one of the mandatory steps during creating a build configuration in TeamCity.
On the 2nd page of the build configuration (Version Control Settings page) do the following :
Attach an existing VCS root to your build configuration, or create a new one to be attached. This is the main part of VCS parameters setup; a VCS Root is a description of a version control system where project sources are located. Learn more about VCS Roots and configuration details here.
When VCS root is attached, specify the checkout rules for it — specifying checkout rules provides advanced possibilities to control sources checkout. With the rules you can exclude and/or map paths to a different location on the Build Agent during checkout.