Task is to form Visual Studio 2010 project so, that during any build or publish some foo.exe
utility should be copied to output (bin
) directory.
Early I have made PostBuildEvent task in .csproj (MSBuild-file):
<PropertyGroup>
<PostBuildEvent>
Copy "$(SolutionDir)Tools\foo.exe" "$(ProjectDir)$(OutDir)foo.exe"
</PostBuildEvent>
</PropertyGroup>
But this is not universal. During publishing (Visual Studio 2010) foo.exe
appears in bin
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 bin
?
foo.exe
in solution to\Tools\Foo\foo.exe
and during publishfoo.exe
is copied tobin\Tools\Foo\foo.exe
. Third party code needs foo.exe to be placed directly tobin
folder. I have already turned offNamespace Provider
property forTools
andFoo
directories. But this doesn't help. I would like not to placefoo.exe
to project root. But if there is no any other variants as I understand this would be the only solution? – Chortle