I would like to perform postBuild action in MS Visual Studio 2022 / C# project.
The action is to copy the executable into a different folder. However the folder is not yet created so the copy
instruction fails. How to use the copy
instruction in a way it creates the required directory or something other like mkdir
? Is anywhere a list of available commands?
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="MKDIR $(SolutionDir)Outputs
copy /Y $(TargetDir)$(TargetName).exe $(SolutionDir)Outputs\$(TargetName).exe" />
</Target>