diff --git a/src/ReswPlus.SourceGenerator/CodeGenerators/CsharpCodeGenerator.cs b/src/ReswPlus.SourceGenerator/CodeGenerators/CsharpCodeGenerator.cs index 7e91b9b..8c8d0e2 100644 --- a/src/ReswPlus.SourceGenerator/CodeGenerators/CsharpCodeGenerator.cs +++ b/src/ReswPlus.SourceGenerator/CodeGenerators/CsharpCodeGenerator.cs @@ -22,7 +22,9 @@ namespace ReswPlus.SourceGenerator.CodeGenerators; /// /// The generated code may look similar to the following: /// -/// // File generated automatically by ReswPlus. https://github.com/DotNetPlus/ReswPlus +/// // +/// // This code was generated by ReswPlus (https://github.com/DotNetPlus/ReswPlus). Do not edit this file directly. +/// // /// using System; /// using Windows.UI.Xaml.Markup; /// using Windows.UI.Xaml.Data; @@ -67,14 +69,18 @@ public IEnumerable GetGeneratedFiles(string? baseFilename, Strong { // Create a header comment that will be placed at the top of the generated file. var headerTrivia = TriviaList( - Comment("// File generated automatically by ReswPlus. https://github.com/DotNetPlus/ReswPlus"), + Comment(""" + // + // This code was generated by ReswPlus (https://github.com/DotNetPlus/ReswPlus). Do not edit this file directly. + // + """), CarriageReturnLineFeed ); // Build the compilation unit (the root node of a C# file) and add required using directives. var compilationUnit = CompilationUnit() - .WithLeadingTrivia(headerTrivia) - .WithUsings(List(GetUsings(info.AppType))); + .WithUsings(List(GetUsings(info.AppType))) + .WithLeadingTrivia(headerTrivia); // Create the strongly-typed static class declaration (the class that will provide resource lookup). var strongClassDecl = CreateStronglyTypedClass(info);