7
I’m developing an application that uses classes generated from xsd files made available by the IRS with the xsd.exe. I use them to serialize xml files from the objects of these classes after performing validation of what was filled with xsd itself.
So far so good, the problem is that these xsd files change version when the IRS understands well, which will cause me a lot of headache to update the xsd and the class generated from it for all customers.
It would force me to re-generate the C# class from the new version xsd and recompile the application. Which is very bad. Not to mention that if I eat ball and some customer is left without the updated build, no xml generated by the application will be valid.
OK enough crying, as I am very amateur, I would like to ask: There is a way to keep xsd files and their respective classes up to date without so much manual work?
You can add two different versions of the xsd file to your question to get a better context of the problem?
– Bruno Costa
@Brunocosta I believe that the colleague is no longer following the community, but it seems to me a question still pertinent. The XSD referred to are from the documentation of the electronic invoice, which can be found here: http://www.nfe.fazenda.gov.br/portal/listaConteudo.aspx?tipConteudo=/fwLvLUSmU8= (several versions including)
– Rovann Linhalis
The problem is that if the XSD changes radically, it’s because things have been changed by who did the scheming, the government, unfortunately. When the change is incremental, minus the code to be changed.
– Tony