Generate Class from XSD - CTE for Webservice SEFAZ

1

Regarding the generation of NFE and CTE classes from the XSD for use in SEFAZ Webservices.

I have had some ambiguity problems in the name of the generated classes. I used the Visual Studio Tools tool to generate the class from the XSD.

However when I import a second .cs generated for the solution (same as in a different project) it accuses various ambiguities between classes. How can I fix this without affecting the final schema in xml generation?

    
asked by anonymous 18.02.2016 / 16:29

1 answer

3

If xsd.exe is generating classes whose names conflict with other classes in your project, you can specify a namespace different when calling it:

xsd.exe /namespace:Meu.Novo.Namespace <outros parametros>

A project can have classes with the same name, as long as they are in different namespaces.

    
18.02.2016 / 17:34