I’m trying to copy a dll compiled file from the ‘Output path’ using post-build event in Visual Studio with xcopy.
When I set the output path to be on the same hard drive as the project itself, the path changes itself to a relative path (“........\abc”), and the post build event fails with exit code 4.
When I set the output path to be on a different hard drive than the project, the path is not changing to a relative path (of course) and the post build event passes successfully.
This is the command:
xcopy.exe $(OutDir)$(TargetName)$(TargetExt) $(SomeFolder)\aa\bb
$SomeFolder
is defined in the csproj file of the project.
I need to make it work with a relative path, how can I do it?
Thanks