title: VS2010 How to include files in project, to copy them to build output directory automatically during build or publish
body: <p>Task is to form Visual Studio 2010 project so, that during any build or publish some <code>foo.exe</code> utility should be copied to output (<code>bin</code>) directory.  </p>
  
  <p>Early I have made PostBuildEvent task in .csproj (MSBuild-file):</p>
  
  <pre><code>&lt;PropertyGroup&gt;
    &lt;PostBuildEvent&gt;
      Copy "$(SolutionDir)Tools\foo.exe" "$(ProjectDir)$(OutDir)foo.exe"
    &lt;/PostBuildEvent&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>But this is not universal. During publishing (Visual Studio 2010) <code>foo.exe</code> appears in <code>bin</code> directory, but is not copied to output publish directory. Maybe I do everything completely wrong and there is standard mechanism to include files in projects to be later, during build or publish, copied to <code>bin</code>?</p>