First we have to install TFS build definition from TFS 2010 installer.
If we try to create a new build using VS we will get following error since we have not configured it.
So, we have to log in to the TFS system
Then open TFS administration console
Stop TFS BUILD service
Set build service properties
New controller and new Agent
Create new build definition using VS
Configure Trigger time
Set build output location
If try to have a build, we will get following error,
We should give write permission for that folder in server.
Finally it Succeed.