Ensure running unit tests sees a fresh environment, not the result of previous run : keep an original copy of test project file before running test methods and restore it after; cleanup generated files after test.
Turn off content-in-external-file feature when running existing unit tests that saves a project file.
Forgot to set the externalFilenameBuildMode variable as well as updating the config when autoConvert is in effect.
Clean up after each test method.
Disable content-in-external-file feature.