I am trying to copy some files on post-build event. These directories are on the same local repository. I was successful to copy these files on the target path however I am having some issues when I build the proj under the target path. I get code 4 error. I think what's causing the problem is that there are some files not accessible on the target path that was included on the post-build command. I am thinking of a possible solution but is still quite unsure how to perform that. Currently when I checked the post-build command on the target path, it does have a post-build command included. Is it possible to clear command on the target paths post-build event? Like make it as the default value.
I am using this code command for the post-build event:
xcopy $(SolutionDir)repo\Project\*.* $(SolutionDir)Artifacts\Project\src\ /y /s /exclude:$(SolutionDir)excludelist.txt
And when I try to build the project on the target path (Artifacts), I got this error:
Can't read file: C:(SolutionDir)\Artifacts\Project\src\excludelist.txt
I understand that excludelist.txt is not accessible since the directory included on the post-build command is on the original directory where the Artifacts folder was copied. So I am wondering if I can however make the post-build command of Artifacts empty by default.
Any help would be appreciated. Thanks!
UPDATE: (solved)
This solution works for me!