VS2019 doesn't rebuild when .asm file is changed
I have a very simple project:
main.cpp
#include <stdio.h>
extern "C" char theText[];
void main()
{
printf( "%s", theText );
}
data.asm
section .data
global _theText
_theText db "hello!",0
With VS2019, on the first build, or a clean build, everything builds fine and I can run the program and print the string.
However, if I change the string in the .asm and press Build again, I get this: (msbuild set to Diagnostic level)
1>------ Up-To-Date check: Project: NasmPropsTest, Configuration: Debug Win32 ------
1>All outputs are up-to-date.
1>Time Elapsed 9 ms
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
Changing the .cpp file and pressing Build correctly rebuilds the .asm file as well.
This is a limitation of the current implementation (I havnt worked out how to get VS to handle it properly). If it doesnt auto rebuild a asm you can right-click the file in solution explorer and select Compile to force it to recompile.
Shouldn't this be covered by the incremental build / tlog system in VS?
Not automatically as for languages that VS doesn't understand (like asm) the build customization needs to be able to instruct VS what files to monitor that actually effect the output. So VS doesnt even know if a *.asm file is even a source file or some sort of configuration. Currently the build customization doesnt do a good enough job of instructing VS what files to monitor and under what circumstances a rebuild is required.