C#项目已经自动生成的类,但是自动生成的呢? [英] C# Project has auto generated classes, but what auto generated them?

查看:331
本文介绍了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.

推荐答案

这是的 XML架构定义工具。你有什么要清理?

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

请注意,通过XSD.EXE执行的操作之一是XSD上课,这是产生问题的类文件

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

XSD到类结果
从XSD架构文件生成运行时类。生成的类可以与System.Xml.Serialization.XmlSerializer结合使用,以读取和写入随后的模式的XML代码

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.

您应该能够改变源XSD文件,那么为了改变输出,同时保持与exe文件本身的兼容性重新运行XSD.EXE。

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.

这篇关于C#项目已经自动生成的类,但是自动生成的呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆