In VS2019, how to automatically copy dependency file to remote Linux host if they are modified?

Viewed 61

In Visual Studio 2019, I make a C project and build it in a remote Linux host. I finish the Remote Build settings, so header files of standard C library and some other library can be copied from remote Linux target for intellisense, and my source files can be copied to remote Linux host for compiling. But when I want to compile single file, something happens unexpectedly. Assumed that I want to compile C file a.c, it needs to include b.h. If a.c file is changed and I compile it, VS will sync this file to remote host. But if b.h file is changed and I compile a.c, VS will not sync b.h to remote host to cover previous one, even if a.c is dependent on b.h. Any way to solve it ?

0 Answers
Related