diff --git a/src/tools/MicroComGenerator/Program.cs b/src/tools/MicroComGenerator/Program.cs index 578ba1465d..2468b1b5a4 100644 --- a/src/tools/MicroComGenerator/Program.cs +++ b/src/tools/MicroComGenerator/Program.cs @@ -35,8 +35,16 @@ namespace MicroComGenerator if (opts.CppOutput != null) File.WriteAllText(opts.CppOutput, CppGen.GenerateCpp(ast)); + if (opts.CSharpOutput != null) + { File.WriteAllText(opts.CSharpOutput, new CSharpGen(ast).Generate()); + + // HACK: Can't work out how to get the VS project system's fast up-to-date checks + // to ignore the generated code, so as a workaround set the write time to that of + // the input. + File.SetLastWriteTime(opts.CSharpOutput, File.GetLastWriteTime(opts.Input)); + } return 0; }