Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio recompile single file each time

Is there any way to recompile one file each time project is compiled? I have about 200 cpp files in project and I have minimal rebuild - vs is recompiling only modified files, but one file needs to be recompiled each time I compile project, because it contains timestamp and few things which are compile time dependent, is there any way to mark any file with 'force recompile' flag? I know I can add space and remove it in this file each time I compile project, but I need way to do it automatically.

like image 723
encoreleeet Avatar asked Feb 19 '16 05:02

encoreleeet


1 Answers

You can add a custom pre-build event for the project. In this step do something to change the timestamp of the file you are interested in. (For example copy the file contents into same file)

enter image description here

like image 62
Mohit Jain Avatar answered Nov 16 '22 07:11

Mohit Jain