Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Project has auto generated classes, but what auto generated them?

Tags:

c#

I am working on a project that I was the original developer on, but over the last couple of years two other developers have maintained and upgraded the project.

There are now some class files inside with the following at the top:

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

using System.Xml.Serialization;

// 
// This source code was auto-generated by xsd, Version=2.0.50727.1432.
// 

Any idea what could have generated these files? There are some issues inside one of them I want to clean up, but it says the changes might be overwritten.

like image 410
Shane Grant Avatar asked Dec 21 '10 02:12

Shane Grant


1 Answers

It's the XML Schema Definition Tool. What do you want to clean up?

Note that one of the operations performed by Xsd.exe is "XSD to classes", which is what generated your class files in question:

XSD to Classes
Generates runtime classes from an XSD schema file. The generated classes can be used in conjunction with System.Xml.Serialization.XmlSerializer to read and write XML code that follows the schema.

You should be able to change the source XSD files, then re-run Xsd.exe in order to change the output while maintaining compatibility with the exe itself.

like image 94
Donut Avatar answered Oct 17 '22 06:10

Donut