Visual Studio: how to run only Custom Custom Step when necessary "

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)

+4
source share
2 answers

I think you need an incremental building.

: http://msdn.microsoft.com/en-us/library/ms171483.aspx

- , MSBuild , / , .

0

, ​​ ( Unix touch).

:

cd c:\custom\build\step\copies\the\dll <br>
copy /b /y YOUR_SOURCE_DIRECTORY/here.dll .<br>
copy /b /y here.dll+,,
0

All Articles