Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does visual studio use to determine that a build is up to date?

I've written a VS addin which intercepts Visual Studio's build command and uses another build system to do a build. I've got my build showing errors in the right format so that you can click on them in VS but the one step remaining for completely seamless integration is to prevent VS's "run" or "debug" commands from whining the it doesn't think the project is built (when of course it is) does anyone know how I can trick VS into thinking the project is built?

like image 243
Benj Avatar asked Jan 26 '10 14:01

Benj


1 Answers

Shortly, MSBuild / Visual Studio checks what is output of defined targets in configuration of particular project. Next it compares timestamp of file(s) specified as target output with timestamps of all files specified as input for that particular target. If input is more up-to-date than output, then it requests to regenerate output (re-compile source code or re-link object files, etc.)

How I can trick VS into thinking the project is built?

Update timestamp of input files, namely source files (.cpp, .cs) or binary files like .obj used as input for linker and other files that are of your interest.

Sometimes I do it manually issuing the following command using touch utility from GnuWIn32

touch myfile.obj
like image 137
mloskot Avatar answered Sep 30 '22 01:09

mloskot