Hi,
I'm writing a version of the XSD command line tool to compile my schemas into C# classes (partly as an exercise and partly to make some changes). When I wrote a simple console application (which utilised the CodeNamespace object), it worked fine, and I saved the cs file it generated. I noted that the file had some attributes added to the classes, one of which was System.CodeDom.Compiler.GeneratedCodeAttribute, which had a value which nicely identified my console application.
I then went one step further, and turned my code into a visual studio "custom tool" (utilising the BaseCodeGeneratorWithSite class from the VS 2008 SDK). This worked as well, and my C# classes are now generated automatically. Nice.
However... I note now that the GeneratedCodeAttribute added to the classes identifies "System.Xml", "2.0.50727.3082". Now... I'll admit that I'm not sure how, or from where, it would know to determine the name and version of "my" code, but I was wondering whether there is a way to specify the value that is presented in this attribute.
One of the reasons for going down this route was to remove the DebuggerStepThroughAttribute from the generated classes - which I am doing (by looping through all the custom attributes on the types in the code namespace), but if I want to change the value in the GeneratedCodeAttribute, do I have to do something similar ?
Thanks, Ross