I am using a Custom Build Step to copy an embedded DLL (i.e. $ (TargetPath) ) of a C ++ project to another location on disk.
I installed the Outputcustom build phase on the destination path of the DLL and Additional Dependenciesup to the $(TargetPath)file I copy, in the hope that VS will only perform the step if the source DLL is newer than the target DLL.
However, every time I create a project, VS starts a custom build step - so it cannot say that there is no need to execute a copy (the original DLL $ (TargetPath) has not changed). I must incorrectly configure this step.
What settings will give me the behavior that I want (i.e. VS considers the project as relevant if it was built, and the custom build step was successful)?
In the VS output window, I see this line, which apparently implies that visual studio accepts vcxproj as a file that launches the build step. I want it to use $ (TargetPath) :
Input file "MyProject.vcxproj" is newer than output file "c:\custom\build\step\copies\the\dll\here.dll".
(PS: I have to add that I used the Post Build Step first, but if this fails, VS considers the project to be successfully built and does not start it again when you create the second time)
source
share