title: C#, TeamCity - Avoiding the post build events on the TeamCity server
body: <p>I have a number of projects which I have outputting to a central repository of DLLs in my development environment. This is achieved by adding an XCopy command into the Post-build event command line of the project.</p>
  
  <pre><code>XCOPY $(TargetDir)$(TargetFileName) C:\DEV\library /I /R /Y
  </code></pre>
  
  <p>I want this to happen in dev mode but when on the TeamCity server I want to avoid the script from being executed. What is the best way of doing this? I am going to search through Google and the documentation but was hoping that others have used TeamCity in a similar way and could advise how it is achieved.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT:</p>
  
  <p>The XCopy is supposed to copy the dll's into a central folder (C:\DEV\library) that the peripheral projects that are dependant on them can access. I have in fact removed the xcopy from the projects because I felt it was more of a hack than a help to use it. Felt like I was forcing a square peg into a round hole.</p>