0

I am using XMLWriter to create a XML structure on a ConsoleApplication in C#. When I run it inside VisualStudio works, but the problem comes when I run it from Windows Command (cmd).

I have copied in another directory, but it does not create "numberOfHouses.txt".

XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.OmitXmlDeclaration = true;
XmlWriter writer = XmlWriter.Create("numberOfHouses.txt", settings);
writer.WriteStartElement("CITY");
writer.WriteElementString("HOUSES","12");
writer.WriteEndElement();
writer.Close(); 

Any suggestion?

thanks

AbdelAziz AbdelLatef
  • 3,650
  • 6
  • 24
  • 52
Daniel Camacho
  • 423
  • 5
  • 12
  • 27

0 Answers0