views:

90

answers:

1

I'm using CodeCompileUnit and CSharpCodeProvider to generate some source code. It adds the header below to all generated code. Is there a way to customize the comment so it says something else?

// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.3053
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
+2  A: 

You can't. I recommend adding your own comment immediately after this one. Here's an example of how to do that: http://www.codeproject.com/KB/dotnet/ResourceClassGenerator.aspx

Joel Rondeau