diff --git a/src/cswinrt/main.cpp b/src/cswinrt/main.cpp index e700b4a2a..d454e3076 100644 --- a/src/cswinrt/main.cpp +++ b/src/cswinrt/main.cpp @@ -321,7 +321,15 @@ Where is one or more of: group.add([&componentActivatableClasses, &projectionFileWritten] { writer wm; - wm.write("// This file was generated by cswinrt.exe version %", VERSION_STRING); + wm.write(R"(//------------------------------------------------------------------------------ +// +// This file was generated by cswinrt.exe version % +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ +)", VERSION_STRING); write_module_activation_factory(wm, componentActivatableClasses); wm.flush_to_file(settings.output_folder / (std::string("WinRT_Module") + ".cs")); projectionFileWritten = true; @@ -330,6 +338,15 @@ Where is one or more of: group.get(); writer eventHelperWriter("WinRT"); + eventHelperWriter.write(R"(//------------------------------------------------------------------------------ +// +// This file was generated by cswinrt.exe version % +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ +)", VERSION_STRING); eventHelperWriter.write("namespace WinRT\n{\n%\n}", bind([&](writer& w) { for (auto&& [key, value] : typeNameToDefinitionMap) { @@ -347,7 +364,15 @@ Where is one or more of: continue; } writer ws; - ws.write("// This file was generated by cswinrt.exe version %", VERSION_STRING); + ws.write(R"(//------------------------------------------------------------------------------ +// +// This file was generated by cswinrt.exe version % +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ +)", VERSION_STRING); ws.write(string.value); ws.flush_to_file(settings.output_folder / (std::string(string.name) + ".cs")); } diff --git a/src/cswinrt/type_writers.h b/src/cswinrt/type_writers.h index fc4a2e4be..83b66b4ac 100644 --- a/src/cswinrt/type_writers.h +++ b/src/cswinrt/type_writers.h @@ -33,7 +33,14 @@ namespace cswinrt { _in_abi_impl_namespace = settings.component; std::string namespacePrefix = settings.component ? "ABI.Impl." : ""; - write(R"(// This file was generated by cswinrt.exe + write(R"(//------------------------------------------------------------------------------ +// +// This file was generated by cswinrt.exe version % +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ using System; using System.Collections; @@ -54,7 +61,7 @@ using WinRT.Interop; namespace %% { -)", namespacePrefix, _current_namespace); +)", VERSION_STRING, namespacePrefix, _current_namespace); } void write_end()